symbian 的双向链表基类

class TDblQueLinkBase

{

public:

inline TDblQueLinkBase() : iNext(NULL){}

 

IMPORT_C void Enque(TDblQueLinkBase* aLink);

IMPORT_C void AddBefore(TDblQueLinkBase* aLink);

public:

TDblQueLinkBase* iNext;

TDblQueLinkBase* iPrev;

};

 

////////////////////////////////////////////////////////////////////

EXPORT_C void TDblQueLinkBase::Enque(TDblQueLinkBase* aLink)

{

iNext=aLink->iNext;

iPrev=aLink;

aLink->iNext->iPrev=this;

aLink->iNext=this;

}

 

 

 

 

EXPORT_C void TDblQueLinkBase::AddBefore(TDblQueLinkBase* aLink)

{

iNext=aLink;

iPrev=aLink->iPrev;

aLink->iPrev->iNext=this;

aLink->iPrev=this;

}

你可能感兴趣的:(c,null,Class,import,Symbian)