commit 2025-10-06 23:26 edit ZCppMain/ZtCSimList.H
This commit is contained in:
@ -6421,6 +6421,9 @@ namespace ZNsMain
|
|||||||
return GetChildObj().size_free();
|
return GetChildObj().size_free();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsEmpty() const{return ml_LinkSize<1;}
|
||||||
|
bool empty () const{return ml_LinkSize<1;}
|
||||||
|
|
||||||
|
|
||||||
void push_front(TypeArg AO_ArgData){AddHead(AO_ArgData);}
|
void push_front(TypeArg AO_ArgData){AddHead(AO_ArgData);}
|
||||||
void push_back (TypeArg AO_ArgData){AddTail(AO_ArgData);}
|
void push_back (TypeArg AO_ArgData){AddTail(AO_ArgData);}
|
||||||
|
@ -1557,6 +1557,7 @@ namespace ZNsMain
|
|||||||
TypeSize size () const{return ml_LinkSize ;}
|
TypeSize size () const{return ml_LinkSize ;}
|
||||||
|
|
||||||
bool IsEmpty() const{return ml_LinkSize<1;}
|
bool IsEmpty() const{return ml_LinkSize<1;}
|
||||||
|
bool empty () const{return ml_LinkSize<1;}
|
||||||
|
|
||||||
|
|
||||||
void DeleteAll()
|
void DeleteAll()
|
||||||
@ -2352,6 +2353,7 @@ namespace ZNsMain
|
|||||||
TypeSize size () const{return ml_LinkSize ;}
|
TypeSize size () const{return ml_LinkSize ;}
|
||||||
|
|
||||||
bool IsEmpty() const{return ml_LinkSize<1;}
|
bool IsEmpty() const{return ml_LinkSize<1;}
|
||||||
|
bool empty () const{return ml_LinkSize<1;}
|
||||||
|
|
||||||
|
|
||||||
void DeleteAll()
|
void DeleteAll()
|
||||||
|
@ -1552,11 +1552,8 @@ namespace ZNsMain
|
|||||||
ZtCObjList& operator=(const ZtCObjList& rhs)*/
|
ZtCObjList& operator=(const ZtCObjList& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
bool IsEmpty() const
|
bool IsEmpty() const{ return mp_HeadLink==0 ; }
|
||||||
{
|
bool empty () const{ return mp_HeadLink==0 ; }
|
||||||
return mp_HeadLink==0 ;
|
|
||||||
}/*
|
|
||||||
bool IsEmpty() const*/
|
|
||||||
|
|
||||||
|
|
||||||
TypeSize GetSize () const{return ml_LinkSize;}
|
TypeSize GetSize () const{return ml_LinkSize;}
|
||||||
|
@ -1228,17 +1228,10 @@ namespace ZNsMain
|
|||||||
{ DeleteAll(); }
|
{ DeleteAll(); }
|
||||||
if(rhs.ml_LinkSize== 0 ){return *this;}
|
if(rhs.ml_LinkSize== 0 ){return *this;}
|
||||||
|
|
||||||
#if(_CODE_NEW_)
|
CopyLink
|
||||||
CopyLink(rhs.mp_HeadLink, rhs.ml_LinkSize-1, *this); return *this;
|
(rhs.mp_HeadLink, rhs.ml_LinkSize-1, *this);
|
||||||
#else
|
|
||||||
ZtCSimList VO_StoreList;
|
|
||||||
|
|
||||||
JoinHead ///////////////////////////
|
return *this;
|
||||||
(
|
|
||||||
CopyLink(rhs.mp_HeadLink, rhs.ml_LinkSize-1, VO_StoreList)
|
|
||||||
);
|
|
||||||
return *this; //////////////////////
|
|
||||||
#endif
|
|
||||||
}/*
|
}/*
|
||||||
ZtCSimList& operator=(const ZtCSimList& rhs)*/
|
ZtCSimList& operator=(const ZtCSimList& rhs)*/
|
||||||
|
|
||||||
@ -1257,46 +1250,15 @@ namespace ZNsMain
|
|||||||
|
|
||||||
TType& operator[](TTypSize AL_Index)
|
TType& operator[](TTypSize AL_Index)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN TType& ZtCSimList::TType& operator[](TTypSize AL_Index)"<<std::endl;
|
|
||||||
fileout<<" Parameter is Bad AL_Index"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
||||||
}/*
|
}/*
|
||||||
TType& operator[](TTypSize AL_Index)*/
|
TType& operator[](TTypSize AL_Index)*/
|
||||||
|
|
||||||
const TType& operator[](TTypSize AL_Index) const
|
const TType& operator[](TTypSize AL_Index) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN const TType& ZtCSimList::TType& operator[](TTypSize AL_Index) const"<<std::endl;
|
|
||||||
fileout<<" Parameter is Bad AL_Index"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
||||||
}
|
}/*
|
||||||
//const TType& operator[](TTypSize AL_Index) const
|
const TType& operator[](TTypSize AL_Index) const*/
|
||||||
|
|
||||||
|
|
||||||
operator TType&(){return AddTailDef()->mo_DataObjt;}
|
operator TType&(){return AddTailDef()->mo_DataObjt;}
|
||||||
@ -1313,14 +1275,11 @@ namespace ZNsMain
|
|||||||
{
|
{
|
||||||
ZCLink* VP_AddLink = GetCFreeHeap().SendFreeOut() ;
|
ZCLink* VP_AddLink = GetCFreeHeap().SendFreeOut() ;
|
||||||
|
|
||||||
#if(_CODE_NEW_)
|
|
||||||
if(TypeMoveObj::ZEUseMoveObj>0) ////////////////////
|
if(TypeMoveObj::ZEUseMoveObj>0) ////////////////////
|
||||||
{
|
{
|
||||||
TypeMoveObj::Exec(VP_AddLink->mo_DataObjt, AR_Type);
|
TypeMoveObj::Exec(VP_AddLink->mo_DataObjt, AR_Type);
|
||||||
}
|
}
|
||||||
else ///////////////////////////////////////////////
|
/*::::::::::::::::::::::::::::::::::::::::::::::::*/
|
||||||
#endif
|
|
||||||
VP_AddLink->mo_DataObjt= AR_Type ;
|
|
||||||
|
|
||||||
if(++ml_LinkSize==1) // ml_LinkSize==0
|
if(++ml_LinkSize==1) // ml_LinkSize==0
|
||||||
{
|
{
|
||||||
@ -1339,43 +1298,43 @@ namespace ZNsMain
|
|||||||
}/*
|
}/*
|
||||||
void AddHead(TypeArg AR_Type)*/
|
void AddHead(TypeArg AR_Type)*/
|
||||||
|
|
||||||
ZCLink* AddHeadDef()
|
ZCLink& AddHeadDef()
|
||||||
{
|
{
|
||||||
ZCLink* VP_AddLink=GetCFreeHeap().SendFreeOut();
|
ZCLink* VP_AddLink=GetCFreeHeap().SendFreeOut();
|
||||||
|
|
||||||
if(++ml_LinkSize==1) // ml_LinkSize==0
|
if(++ml_LinkSize==1) // ml_LinkSize==0
|
||||||
{
|
{
|
||||||
mp_HeadLink =
|
mp_HeadLink = mp_TailLink = VP_AddLink ;
|
||||||
mp_TailLink = VP_AddLink ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ZCLink::JoinLink(VP_AddLink, mp_HeadLink);
|
ZCLink::JoinLink
|
||||||
|
(VP_AddLink, mp_HeadLink);
|
||||||
|
|
||||||
mp_HeadLink = VP_AddLink ;
|
mp_HeadLink = VP_AddLink ;
|
||||||
}
|
}
|
||||||
ZCLink::MakeRing(mp_HeadLink, mp_TailLink);
|
|
||||||
|
ZCLink::MakeRing
|
||||||
|
(mp_HeadLink, mp_TailLink);
|
||||||
|
|
||||||
|
return *VP_AddLink;
|
||||||
}/*
|
}/*
|
||||||
ZCLink* AddHeadDef()*/
|
ZCLink& AddHeadDef()*/
|
||||||
|
|
||||||
|
|
||||||
void AddTail(TypeArg AR_Type)
|
void AddTail(TypeArg AR_Type)
|
||||||
{
|
{
|
||||||
ZCLink* VP_AddLink = GetCFreeHeap().SendFreeOut();
|
ZCLink* VP_AddLink = GetCFreeHeap().SendFreeOut();
|
||||||
|
|
||||||
#if(_CODE_NEW_)
|
if(TypeMoveObj::ZEUseMoveObj>0) //::::::::::::::::
|
||||||
if(TypeMoveObj::ZEUseMoveObj>0) ////////////////////
|
|
||||||
{
|
{
|
||||||
TypeMoveObj::Exec(VP_AddLink->mo_DataObjt, AR_Type);
|
TypeMoveObj::Exec(VP_AddLink->mo_DataObjt, AR_Type);
|
||||||
}
|
}
|
||||||
else ///////////////////////////////////////////////
|
/*::::::::::::::::::::::::::::::::::::::::::::::*/
|
||||||
#endif
|
|
||||||
VP_AddLink->mo_DataObjt= AR_Type ;
|
|
||||||
|
|
||||||
if(++ml_LinkSize==1) // ml_LinkSize==0
|
if(++ml_LinkSize==1) // ml_LinkSize==0
|
||||||
{
|
{
|
||||||
mp_HeadLink =
|
mp_HeadLink = mp_TailLink = VP_AddLink ;
|
||||||
mp_TailLink = VP_AddLink ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1395,16 +1354,20 @@ namespace ZNsMain
|
|||||||
|
|
||||||
if(++ml_LinkSize==1) // ml_LinkSize==0
|
if(++ml_LinkSize==1) // ml_LinkSize==0
|
||||||
{
|
{
|
||||||
mp_HeadLink =
|
mp_HeadLink = mp_TailLink = VP_AddLink ;
|
||||||
mp_TailLink = VP_AddLink ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ZCLink::JoinLink(mp_TailLink, VP_AddLink);
|
ZCLink::JoinLink
|
||||||
|
(mp_TailLink, VP_AddLink);
|
||||||
|
|
||||||
mp_TailLink = VP_AddLink ;
|
mp_TailLink = VP_AddLink ;
|
||||||
}
|
}
|
||||||
ZCLink::MakeRing(mp_HeadLink, mp_TailLink);
|
|
||||||
|
ZCLink::MakeRing
|
||||||
|
(mp_HeadLink, mp_TailLink);
|
||||||
|
|
||||||
|
return *VP_AddLink;
|
||||||
}/*
|
}/*
|
||||||
ZCLink* AddTailDef()*/
|
ZCLink* AddTailDef()*/
|
||||||
|
|
||||||
@ -1473,42 +1436,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
TType& GetHeadData()
|
TType& GetHeadData()
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(mp_HeadLink==0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN TType& ZtCSimList::GetHeadData()"<<std::endl;
|
|
||||||
fileout<<" mp_HeadLink Pointer is NULL"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(mp_HeadLink==0)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_HeadLink->mo_DataObjt;
|
return mp_HeadLink->mo_DataObjt;
|
||||||
}/*
|
}/*
|
||||||
TType& GetHeadData()*/
|
TType& GetHeadData()*/
|
||||||
|
|
||||||
const TType& GetHeadData() const
|
const TType& GetHeadData() const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(mp_HeadLink==0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN const TType& ZtCSimList::GetHeadData() const"<<std::endl;
|
|
||||||
fileout<<" mp_HeadLink Pointer is NULL"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(mp_HeadLink==0)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_HeadLink->mo_DataObjt;
|
return mp_HeadLink->mo_DataObjt;
|
||||||
}/*
|
}/*
|
||||||
const TType& GetHeadData() const*/
|
const TType& GetHeadData() const*/
|
||||||
@ -1516,42 +1449,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
TType& GetTailData()
|
TType& GetTailData()
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(mp_TailLink==0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN const TType& ZtCSimList::GetTailData() const"<<std::endl;
|
|
||||||
fileout<<" mp_TailLink Pointer is NULL"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(mp_TailLink==0)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_TailLink->mo_DataObjt ;
|
return mp_TailLink->mo_DataObjt ;
|
||||||
}/*
|
}/*
|
||||||
TType& GetTailData()*/
|
TType& GetTailData()*/
|
||||||
|
|
||||||
const TType& GetTailData() const
|
const TType& GetTailData() const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(mp_TailLink==0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN const TType& ZtCSimList::GetTailData() const"<<std::endl;
|
|
||||||
fileout<<" mp_TailLink Pointer is NULL"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(mp_TailLink==0)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_TailLink->mo_DataObjt ;
|
return mp_TailLink->mo_DataObjt ;
|
||||||
}/*
|
}/*
|
||||||
const TType& GetTailData() const*/
|
const TType& GetTailData() const*/
|
||||||
@ -1559,42 +1462,12 @@ namespace ZNsMain
|
|||||||
|
|
||||||
TType& GetData(TTypSize AL_Index)
|
TType& GetData(TTypSize AL_Index)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN TType& ZtCSimList::GetData(TTypSize AL_Index)"<<std::endl;
|
|
||||||
fileout<<" Parameter is Bad AL_Index"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
||||||
}/*
|
}/*
|
||||||
TType& GetData(TTypSize AL_Index)*/
|
TType& GetData(TTypSize AL_Index)*/
|
||||||
|
|
||||||
TType GetData(TTypSize AL_Index) const
|
TType GetData(TTypSize AL_Index) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error IN TType& ZtCSimList::GetData(TTypSize AL_Index)"<<std::endl;
|
|
||||||
fileout<<" Parameter is Bad AL_Index"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
return GetLinkPtr(AL_Index)->mo_DataObjt;
|
||||||
}/*
|
}/*
|
||||||
TType GetData(TTypSize AL_Index) const*/
|
TType GetData(TTypSize AL_Index) const*/
|
||||||
@ -1602,27 +1475,6 @@ namespace ZNsMain
|
|||||||
|
|
||||||
void JoinHead(ZCLink* AP_Link)
|
void JoinHead(ZCLink* AP_Link)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AP_Link==0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'void JoinHead(ZCLink* AP_Link)' : Parameter is null pointer"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
else if(Find(AP_Link)!=0) // AP_Link 가 this 가 가리키는 연결리스트에 존재하는 링크인가.
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<"Error In 'void JoinHead(ZCLink* AP_Link)' : The list that parameter link belongs to is now list"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
else if(Find(AP_Link)!=0)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
if(mp_HeadLink==0)
|
if(mp_HeadLink==0)
|
||||||
{
|
{
|
||||||
mp_HeadLink = mp_TailLink = AP_Link ;
|
mp_HeadLink = mp_TailLink = AP_Link ;
|
||||||
@ -1639,28 +1491,6 @@ namespace ZNsMain
|
|||||||
|
|
||||||
void JoinTail(ZCLink* AP_Link)
|
void JoinTail(ZCLink* AP_Link)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AP_Link==0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'void JoinTail(ZCLink* AP_Link)' : Parameter is null pointer"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
else if(Find(AP_Link)!=0)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'void JoinTail(ZCLink* AP_Link)' : The list that parameter link belongs to is now list"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
else if(Find(AP_Link)!=0)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
if(mp_HeadLink==0)
|
if(mp_HeadLink==0)
|
||||||
{
|
{
|
||||||
mp_HeadLink =
|
mp_HeadLink =
|
||||||
@ -1778,8 +1608,13 @@ namespace ZNsMain
|
|||||||
|
|
||||||
ZCLink* VP_NewHead= mp_HeadLink->
|
ZCLink* VP_NewHead= mp_HeadLink->
|
||||||
GetNextPtr( AL_DelSize );
|
GetNextPtr( AL_DelSize );
|
||||||
GetCFreeHeap().RecvFreeIn
|
GetCFreeHeap().RecvFreeIn ////////////
|
||||||
(AL_DelSize, mp_HeadLink, VP_NewHead->mp_PrevLink);
|
(
|
||||||
|
AL_DelSize ,
|
||||||
|
mp_HeadLink ,
|
||||||
|
VP_NewHead->mp_PrevLink
|
||||||
|
);
|
||||||
|
//////////////////////////////////////
|
||||||
|
|
||||||
mp_HeadLink = VP_NewHead ;
|
mp_HeadLink = VP_NewHead ;
|
||||||
ml_LinkSize -= AL_DelSize ;
|
ml_LinkSize -= AL_DelSize ;
|
||||||
@ -1816,20 +1651,6 @@ namespace ZNsMain
|
|||||||
|
|
||||||
void Delete(ZCLink* AP_PrevLink, ZCLink* AP_CutLink)
|
void Delete(ZCLink* AP_PrevLink, ZCLink* AP_CutLink)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
if ( Find(AP_CutLink)==0 ||
|
|
||||||
Find(AP_CutLink)!=Find(AP_PrevLink)+1
|
|
||||||
)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'void Delete(ZCLink* AP_PrevLink, ZCLink* AP_CutLink)' : Parameter is Bad Pointer"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
GetCFreeHeap().RecvFreeIn
|
GetCFreeHeap().RecvFreeIn
|
||||||
( CutLink(AP_PrevLink, AP_CutLink) );
|
( CutLink(AP_PrevLink, AP_CutLink) );
|
||||||
}/*
|
}/*
|
||||||
@ -1837,21 +1658,6 @@ namespace ZNsMain
|
|||||||
|
|
||||||
void Delete(ZCLink* AP_PrevLink, ZCLink* AP_CutLink, TTypSize AL_CutPos)
|
void Delete(ZCLink* AP_PrevLink, ZCLink* AP_CutLink, TTypSize AL_CutPos)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
if ( ml_LinkSize==0 ||
|
|
||||||
Find(AP_CutLink) !=AL_CutPos ||
|
|
||||||
Find(AP_PrevLink)!=(AL_CutPos-1)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'void Delete(ZCLink* AP_PrevLink, ZCLink* AP_CutLink, TTypSize AL_CutPos)' : Parameter is Bad Pointer or Bad AL_Index"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
GetCFreeHeap().RecvFreeIn
|
GetCFreeHeap().RecvFreeIn
|
||||||
( CutLink(AP_PrevLink, AP_CutLink, AL_CutPos) );
|
( CutLink(AP_PrevLink, AP_CutLink, AL_CutPos) );
|
||||||
}/*
|
}/*
|
||||||
@ -1865,26 +1671,6 @@ namespace ZNsMain
|
|||||||
)
|
)
|
||||||
/*###############################################*/
|
/*###############################################*/
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if ( ml_LinkSize==0 ||
|
|
||||||
AL_CutHeadPos>AL_CutTailPos ||
|
|
||||||
Find(AP_CutHead)!=AL_CutHeadPos ||
|
|
||||||
Find(AP_CutTail)!=AL_CutTailPos ||
|
|
||||||
(AL_CutHeadPos!=1 && AP_CutHeadPrev->mp_NextLink!=AP_CutHead)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'void Delete(ZCLink* AP_CutHeadPrev,ZCLink* AP_CutHead,TTypSize AL_CutHeadPos,ZCLink* AP_CutTail,TTypSize AL_CutTailPos)' : Parameter is Bad Pointer or Bad AL_Index"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
/*////////////////////////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
ZtCSimList VO_StoreList;
|
ZtCSimList VO_StoreList;
|
||||||
|
|
||||||
CutLink /*==========================================*/
|
CutLink /*==========================================*/
|
||||||
@ -2007,21 +1793,6 @@ namespace ZNsMain
|
|||||||
|
|
||||||
ZCLink* GetLinkPtr(TTypSize AL_Index)
|
ZCLink* GetLinkPtr(TTypSize AL_Index)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'ZCLink* GetLinkPtr(TTypSize AL_Index)' : Parameter is Bad AL_Index(AL_Index="<<AL_Index<<")"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_HeadLink->GetNextPtr(AL_Index-1);
|
return mp_HeadLink->GetNextPtr(AL_Index-1);
|
||||||
}/*
|
}/*
|
||||||
ZCLink* GetLinkPtr(TTypSize AL_Index)*/
|
ZCLink* GetLinkPtr(TTypSize AL_Index)*/
|
||||||
@ -2029,21 +1800,6 @@ namespace ZNsMain
|
|||||||
|
|
||||||
const ZCLink* GetLinkPtr(TTypSize AL_Index) const
|
const ZCLink* GetLinkPtr(TTypSize AL_Index) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)
|
|
||||||
{
|
|
||||||
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
|
|
||||||
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
|
|
||||||
fileout<<"Error In 'const ZCLink* GetLinkPtr(TTypSize AL_Index) const' : Parameter is Bad AL_Index(AL_Index="<<AL_Index<<")"<<std::endl;
|
|
||||||
fileout.close();
|
|
||||||
|
|
||||||
exit(1);
|
|
||||||
}/*
|
|
||||||
if(AL_Index<1 || AL_Index>ml_LinkSize)*/
|
|
||||||
|
|
||||||
#endif //_DEBUG
|
|
||||||
|
|
||||||
return mp_HeadLink->GetNextPtr(AL_Index-1);
|
return mp_HeadLink->GetNextPtr(AL_Index-1);
|
||||||
}/*
|
}/*
|
||||||
const ZCLink* GetLinkPtr(TTypSize AL_Index) const*/
|
const ZCLink* GetLinkPtr(TTypSize AL_Index) const*/
|
||||||
@ -2070,11 +1826,8 @@ namespace ZNsMain
|
|||||||
{ return mo_FreeObjt.size(); }
|
{ return mo_FreeObjt.size(); }
|
||||||
|
|
||||||
|
|
||||||
inline bool IsEmpty() const
|
inline bool IsEmpty() const{ return mp_HeadLink==0; }
|
||||||
{
|
inline bool empty () const{ return mp_HeadLink==0; }
|
||||||
return mp_HeadLink==0;
|
|
||||||
}/*
|
|
||||||
inline bool IsEmpty() const*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user