C++模板有关问题的请问

C++模板问题的请教
我在自学殷人昆著的《数据结构》,书中大部分算法是用模板描述的。最近我想检验各种排序算法的C++实现,于是我想用模板定义各种算法,再实例化,来检测各种算法的复杂度.但由于是很久以前学的模板知识,并且当时也不怎么认真,这几天找了很多资料,都觉得对自己没什么启示(主要是针对下边这段代码的模板实例化而言),看哪位大侠能给我指点迷津,或者能否就该书中的一个模板写个完整的程序作例子?(下边的程序主要是来自该书中的第21,22及302,304页,注释部分中打?的为我感到迷惑的)。
#include <iostream>
using   namespace   std;

const   int   DefaultSize=100;
template <class   Type> class   datalist;//数据表的前视声明

template <class   Type> class   Element   {//数据表元素类的定义
private:
Type   key;//关键码
//field   otherdata;//其它数据成员
public:
Type   getKey(){return   key;}//取当前结点的关键码
void   setKey(const   Type   x)   {key=x;}/*修改当前关键码.*/
Element <Type>   &operator=(Element <Type>   &x){this=x;}//赋值符号重载
int   operator==(Type   &x){return!(this <x||x <this);}//判this与X相等
int   operator!=(Type   &x){return   this <x||x <this;}/*判this与x不等。*/
int   operator <=(Type   &x){return   !(this> x);}
int   operator> =(Type   &x){return   !(this <x);}
int   operator <(Type   &x){return   this <x;}
                friend   ostream&   operator < <(ostream&outStream,const   datalist <Type> &   list);//输出重载操作符.
friend   istream&   operator> > (istream&   inSream,const   datalist <Type> &list);   //输入重戴操作符.
};


template <class   Type> class   datalist{//用顺序表储存待排序的元素.
public:
datalist(int   MaxSz=DefaultSize):MaxSize(Maxsz),CurrentSize(0)/*这一行是不是参数列表?
{Vector=new   Element <Type> [MaxSz];}
void   swap(Element <Type>   &x,Element <Type>   &y)
{Element <Type> temp=x;x=y;y=temp;}
private:
Element <Type>   *Vector;//存储待排序元素的向量
int   MaxSize,CurrentSize;/*向量中最大元素个数与当前元素个数。*/
};

template <class   Type> ostream&operator   < <(ostream&   Outstream,const   datalist <Type> &list){
Outstream < < "Array   Contents:\n ";
for(int   i=0;i <list.CurrentSize;i++)
OutStream < <endl;
OutStram < < "Array   Current   Size: " < <list.CurrentSize < <endl;
return   OutStream;
}
template <class   Type> istream&   operator> > (istream&InStream,datalist <Type> &list){
cout < < "Enter   array   Current   Size: ";
Instream> > list.CurrentSize;
cout < < "Enter   array   elements:\n ";
for(int   i=0;i <list.CurrentSize;i++){
InStream> > list.Element[i];
}
return   InStream;
}  

//下边为直接插入算法的模板。按关键码key非递减顺序对表进行排序。
template <class   Type> void   InsertionSort(datalist <Type>   &list){
for(int   i=1;i <list.currentSize;i++)Insert(list,i);}
/*将元素list.Vector[i]按其关键码插入到有序表list.Vector[0],...list.Vector[i-1]中,使得list.Vector[0]到list.Vector[i]有序。*/
template <class   Type>   void   Insert(datalist <Type>   &list,int   i){
Element <Type> temp=list.Vector[i];int   j=i;
while(j> 0&&temp.getKey() <list.Vector[j-1].getKey()){
list.Vector[j]=list.Vector[j-1];j--;
}
list.Vector[j]=temp;
}

//下边为主函数,也是我感到迷惑的地方?
int     main()
{
      int   MaxSz   =15;//