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