52 lines
909 B
C++
52 lines
909 B
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TGPList.h
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: 类的声明 单向指针递归链
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TGPLIST_H_
|
|
#define _TGPLIST_H_
|
|
|
|
#ifndef _TPGEGLIST_H_
|
|
#include "TPGeGList.h"
|
|
#endif
|
|
|
|
template<class T> class TGPList : public TPGeGList<T*>
|
|
{
|
|
TGPList();
|
|
|
|
virtual ~TGPList();
|
|
|
|
void Release();
|
|
};
|
|
|
|
template<class T>
|
|
TGPList<T>::TGPList()
|
|
{
|
|
this->data=NULL;
|
|
}
|
|
|
|
template<class T>
|
|
TGPList<T>::~TGPList()
|
|
{
|
|
if (this->data != NULL)
|
|
{
|
|
delete this->data;
|
|
}
|
|
}
|
|
|
|
template<class T>
|
|
void TGPList<T>::Release()
|
|
{
|
|
if (this->data != NULL)
|
|
{
|
|
delete this->data;
|
|
}
|
|
this->data = NULL;
|
|
}
|
|
|
|
#endif |