commit 2025-09-27 18:59 edit a bit ZCppMain/ZtCObjList.H
This commit is contained in:
@ -1100,14 +1100,14 @@ namespace ZNsMain
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
template<typename TTypeNow, typename TTypeChild>
|
||||
class ZtCTypeNowCRTP
|
||||
{ public: typedef TTypeChild TypeData; public: enum{ZEUseCRTP=1}; };
|
||||
class ZtCTypeNowCRTP
|
||||
{ public: typedef TTypeChild TypeData; public: enum{ZEUseCRTP=1}; };
|
||||
template<typename TTypeNow>
|
||||
class ZtCTypeNowCRTP<TTypeNow, ZCEmpty>
|
||||
{ public: typedef TTypeNow TypeData; public: enum{ZEUseCRTP=0}; };
|
||||
class ZtCTypeNowCRTP<TTypeNow, ZCEmpty>
|
||||
{ public: typedef TTypeNow TypeData; public: enum{ZEUseCRTP=0}; };
|
||||
template<typename TTypeNow>
|
||||
class ZtCTypeNowCRTP<TTypeNow, void >
|
||||
{ public: typedef TTypeNow TypeData; public: enum{ZEUseCRTP=0}; };
|
||||
class ZtCTypeNowCRTP<TTypeNow, void >
|
||||
{ public: typedef TTypeNow TypeData; public: enum{ZEUseCRTP=0}; };
|
||||
|
||||
|
||||
|
||||
|
@ -3449,7 +3449,7 @@ namespace ZNsMain
|
||||
ZCLinkUnit* mp_CutHeadUnit; // '내부 삭제 리스트'의 첫 ZCLinkUnit 포인터. 일종의 삭제 버퍼다.
|
||||
TypeSize ml_NowUnitCnt ; // '내부 사용 리스트'의 ZCLinkUnit 의 갯수.
|
||||
TypeSize ml_CutUnitCnt ; // '내부 삭제 리스트'의 ZCLinkUnit 의 갯수 , 즉 삭제 버퍼에 있는 ZCLinkUnit 의 갯수.
|
||||
TypeSize ml_NowObjtCnt ; // mp_NowHeadUnit 이 시작인 리스트의 원소 수.
|
||||
TypeSize ml_NowObjtCnt ; // '내부 사용 리스트'의 모든 ZCLinkUnit 의 원소 수.
|
||||
/*private:*/
|
||||
private:
|
||||
|
||||
@ -3471,9 +3471,9 @@ namespace ZNsMain
|
||||
|
||||
if(ml_CutUnitCnt<1)
|
||||
{
|
||||
ZCLinkUnit* VP_NewCLinkUnit=CreateUnit();
|
||||
ZCLinkUnit* VP_NewLinkUnit=CreateUnit();
|
||||
|
||||
VP_NewCLinkUnit->ml_UseSize=0; return VP_NewCLinkUnit;
|
||||
VP_NewLinkUnit->ml_UseSize=0; return VP_NewLinkUnit;
|
||||
}/*
|
||||
if(ml_CutUnitCnt<1)*/
|
||||
|
||||
@ -3488,7 +3488,7 @@ namespace ZNsMain
|
||||
ZCLinkUnit::MakeCircle(mp_CutHeadUnit, VP_CutTailUnit);
|
||||
//else
|
||||
|
||||
VP_CutHeadUnit->ml_UseSize=0; return VP_CutHeadUnit;
|
||||
VP_CutHeadUnit->ml_UseSize=0; return VP_CutHeadUnit;
|
||||
}/*
|
||||
ZCLinkUnit* AllocUnit()*/
|
||||
|
||||
@ -3496,26 +3496,26 @@ namespace ZNsMain
|
||||
{
|
||||
// AllocUnit() 을 통해 가져온 ZCLinkUnit* 을 '내부 사용 리스트'의 앞에 삽입한다.
|
||||
|
||||
ZCLinkUnit* VP_NewCLinkUnit=AllocUnit();
|
||||
ZCLinkUnit* VP_NewLinkUnit= AllocUnit();
|
||||
|
||||
if(++ml_NowUnitCnt<=1)
|
||||
{
|
||||
mp_NowHeadUnit=VP_NewCLinkUnit;
|
||||
mp_NowHeadUnit->mp_NextUnit=mp_NowHeadUnit;
|
||||
mp_NowHeadUnit->mp_PrevUnit=mp_NowHeadUnit;
|
||||
mp_NowHeadUnit = VP_NewLinkUnit;
|
||||
mp_NowHeadUnit->mp_NextUnit = mp_NowHeadUnit ;
|
||||
mp_NowHeadUnit->mp_PrevUnit = mp_NowHeadUnit ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ZCLinkUnit* VP_TailCLinkUnit=mp_NowHeadUnit->mp_PrevUnit;
|
||||
ZCLinkUnit* VP_TailCLinkUnit= mp_NowHeadUnit->mp_PrevUnit;
|
||||
|
||||
ZCLinkUnit::JoinLink (VP_NewCLinkUnit, mp_NowHeadUnit );
|
||||
ZCLinkUnit::MakeCircle(VP_NewCLinkUnit, VP_TailCLinkUnit);
|
||||
ZCLinkUnit::JoinLink (VP_NewLinkUnit, mp_NowHeadUnit );
|
||||
ZCLinkUnit::MakeCircle(VP_NewLinkUnit, VP_TailCLinkUnit);
|
||||
|
||||
mp_NowHeadUnit=VP_NewCLinkUnit;
|
||||
mp_NowHeadUnit=VP_NewLinkUnit;
|
||||
}/*
|
||||
else*/
|
||||
|
||||
return VP_NewCLinkUnit;
|
||||
return VP_NewLinkUnit;
|
||||
}/*
|
||||
ZCLinkUnit* AllocUnitAtHead()*/
|
||||
|
||||
@ -3523,24 +3523,24 @@ namespace ZNsMain
|
||||
{
|
||||
// AllocUnit() 을 통해 가져온 ZCLinkUnit* 을 '내부 사용 리스트'의 뒤에 삽입한다.
|
||||
|
||||
ZCLinkUnit* VP_NewCLinkUnit=AllocUnit();
|
||||
ZCLinkUnit* VP_NewLinkUnit= AllocUnit();
|
||||
|
||||
if(++ml_NowUnitCnt<=1)
|
||||
{
|
||||
mp_NowHeadUnit=VP_NewCLinkUnit;
|
||||
mp_NowHeadUnit->mp_NextUnit=mp_NowHeadUnit;
|
||||
mp_NowHeadUnit->mp_PrevUnit=mp_NowHeadUnit;
|
||||
mp_NowHeadUnit = VP_NewLinkUnit;
|
||||
mp_NowHeadUnit->mp_NextUnit= mp_NowHeadUnit;
|
||||
mp_NowHeadUnit->mp_PrevUnit= mp_NowHeadUnit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ZCLinkUnit* VP_TailCLinkUnit=mp_NowHeadUnit->mp_PrevUnit;
|
||||
ZCLinkUnit* VP_TailCLinkUnit= mp_NowHeadUnit->mp_PrevUnit;
|
||||
|
||||
ZCLinkUnit::JoinLink (VP_TailCLinkUnit,VP_NewCLinkUnit);
|
||||
ZCLinkUnit::MakeCircle(mp_NowHeadUnit ,VP_NewCLinkUnit);
|
||||
ZCLinkUnit::JoinLink (VP_TailCLinkUnit, VP_NewLinkUnit);
|
||||
ZCLinkUnit::MakeCircle(mp_NowHeadUnit , VP_NewLinkUnit);
|
||||
}/*
|
||||
else*/
|
||||
|
||||
return VP_NewCLinkUnit;
|
||||
return VP_NewLinkUnit;
|
||||
}/*
|
||||
ZCLinkUnit* AllocUnitAtTail()*/
|
||||
|
||||
|
Reference in New Issue
Block a user