commit 2025-09-20 08:29 mv ZtCList to ZtCBaseList in ZCppMain/ZMainHead.H
This commit is contained in:
@ -55,7 +55,7 @@ namespace ZNsMain
|
|||||||
)
|
)
|
||||||
/*########################################################*/
|
/*########################################################*/
|
||||||
{
|
{
|
||||||
// TPosList : ZNsMain::ZtCList<TypeLength> etc
|
// TPosList : ZNsMain::ZtCBaseList<TypeLength> etc
|
||||||
|
|
||||||
if(0 > AL_Offset) AL_Offset=0 ;
|
if(0 > AL_Offset) AL_Offset=0 ;
|
||||||
if(this->size() <= AL_Offset) return ;
|
if(this->size() <= AL_Offset) return ;
|
||||||
@ -100,7 +100,7 @@ namespace ZNsMain
|
|||||||
)
|
)
|
||||||
/*##########################################################*/
|
/*##########################################################*/
|
||||||
{
|
{
|
||||||
// TPosList : ZNsMain::ZtCList<TypeLength> etc
|
// TPosList : ZNsMain::ZtCBaseList<TypeLength> etc
|
||||||
// AL_Replace : APC_Replace 의 길이
|
// AL_Replace : APC_Replace 의 길이
|
||||||
// AL_Searched : 이전에 찾은 길이
|
// AL_Searched : 이전에 찾은 길이
|
||||||
// ARR_SaveOut : AL_Replace>AL_Searched 인 경우에 여기에 저장한다.
|
// ARR_SaveOut : AL_Replace>AL_Searched 인 경우에 여기에 저장한다.
|
||||||
@ -245,11 +245,11 @@ namespace ZNsMain
|
|||||||
if(this->size() <= AL_Offset) return *this;
|
if(this->size() <= AL_Offset) return *this;
|
||||||
if(this->size() < 1 ) return *this;
|
if(this->size() < 1 ) return *this;
|
||||||
|
|
||||||
ZtCList<TypeLength> VO_CPosCList; FindPosToList
|
ZtCBaseList<TypeLength> VO_CPosCList; FindPosToList
|
||||||
(
|
(
|
||||||
RR(VO_CPosCList), APC_Search, AL_Search, AL_Offset
|
RR(VO_CPosCList), APC_Search, AL_Search, AL_Offset
|
||||||
);
|
);
|
||||||
/*////////////////////////////////////////////*/
|
/*////////////////////////////////////////////////*/
|
||||||
|
|
||||||
return ReplaceByPosList /*::::::::::::::::::::::::::::*/
|
return ReplaceByPosList /*::::::::::::::::::::::::::::*/
|
||||||
(
|
(
|
||||||
|
@ -4995,7 +4995,7 @@ namespace ZNsMain
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// class ZtCList : simple circular double linked list
|
// class ZtCBaseList : circular double linked list
|
||||||
|
|
||||||
template ///////////////////////////////////////////////
|
template ///////////////////////////////////////////////
|
||||||
<
|
<
|
||||||
@ -5006,7 +5006,7 @@ namespace ZNsMain
|
|||||||
typename TMoveObj = ZNsMain::
|
typename TMoveObj = ZNsMain::
|
||||||
ZtCMoveObj<TType, TTypArgu, true>
|
ZtCMoveObj<TType, TTypArgu, true>
|
||||||
>
|
>
|
||||||
class ZtCList /*######################################*/
|
class ZtCBaseList /*##################################*/
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
class ZCLink;
|
class ZCLink;
|
||||||
@ -5023,8 +5023,8 @@ namespace ZNsMain
|
|||||||
|
|
||||||
class ZCLink : public TypeAlloc
|
class ZCLink : public TypeAlloc
|
||||||
{
|
{
|
||||||
public:
|
public :
|
||||||
friend class ZtCList;
|
friend class ZtCBaseList;
|
||||||
private:
|
private:
|
||||||
TypeData mo_Data ;
|
TypeData mo_Data ;
|
||||||
ZCLink* mp_NextLink ;
|
ZCLink* mp_NextLink ;
|
||||||
@ -5166,15 +5166,15 @@ namespace ZNsMain
|
|||||||
private :*/
|
private :*/
|
||||||
public :
|
public :
|
||||||
|
|
||||||
ZtCList()
|
ZtCBaseList()
|
||||||
{
|
{
|
||||||
mp_HeadLink = 0 ;
|
mp_HeadLink = 0 ;
|
||||||
mp_TailLink = 0 ;
|
mp_TailLink = 0 ;
|
||||||
ml_LinkCnt = 0 ;
|
ml_LinkCnt = 0 ;
|
||||||
}/*
|
}/*
|
||||||
ZtCList()*/
|
ZtCBaseList()*/
|
||||||
|
|
||||||
ZtCList(const ZtCList& rhs)
|
ZtCBaseList(const ZtCBaseList& rhs)
|
||||||
{
|
{
|
||||||
mp_HeadLink = 0 ;
|
mp_HeadLink = 0 ;
|
||||||
mp_TailLink = 0 ;
|
mp_TailLink = 0 ;
|
||||||
@ -5182,22 +5182,19 @@ namespace ZNsMain
|
|||||||
|
|
||||||
*this = (rhs);
|
*this = (rhs);
|
||||||
}/*
|
}/*
|
||||||
ZtCList(const ZtCList& rhs)*/
|
ZtCBaseList(const ZtCBaseList& rhs)*/
|
||||||
|
|
||||||
~ZtCList()
|
~ZtCBaseList()
|
||||||
{
|
{
|
||||||
DeleteAll();
|
DeleteAll();
|
||||||
}/*
|
}/*
|
||||||
~ZtCList()*/
|
~ZtCBaseList()*/
|
||||||
|
|
||||||
|
|
||||||
ZtCList& operator=(const ZtCList& rhs)
|
ZtCBaseList& operator=(const ZtCBaseList& rhs)
|
||||||
{
|
{
|
||||||
if(this==&rhs) return *this;
|
if(this==&rhs) return *this; this->DeleteAll();
|
||||||
|
|
||||||
|
|
||||||
this->DeleteAll();
|
|
||||||
{
|
|
||||||
ZCLink* VP_NowLink = rhs.mp_HeadLink ;
|
ZCLink* VP_NowLink = rhs.mp_HeadLink ;
|
||||||
|
|
||||||
__for0(TypeSize, i, rhs.size())
|
__for0(TypeSize, i, rhs.size())
|
||||||
@ -5207,10 +5204,8 @@ namespace ZNsMain
|
|||||||
VP_NowLink = VP_NowLink->mp_NextLink;
|
VP_NowLink = VP_NowLink->mp_NextLink;
|
||||||
}/*
|
}/*
|
||||||
__for0(TypeSize, i, rhs.size())*/
|
__for0(TypeSize, i, rhs.size())*/
|
||||||
}
|
|
||||||
rhs. DeleteAll();
|
|
||||||
}/*
|
}/*
|
||||||
ZtCList& operator=(const ZtCList& rhs)*/
|
ZtCBaseList& operator=(const ZtCBaseList& rhs)*/
|
||||||
|
|
||||||
|
|
||||||
void DeleteAll()
|
void DeleteAll()
|
||||||
@ -5551,7 +5546,7 @@ namespace ZNsMain
|
|||||||
typename TMoveObj = ZNsMain::
|
typename TMoveObj = ZNsMain::
|
||||||
ZtCMoveObj<TType, TTypArgu, true>
|
ZtCMoveObj<TType, TTypArgu, true>
|
||||||
>
|
>
|
||||||
class ZtCList /*######################################*/
|
class ZtCBaseList /*##################################*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -5663,12 +5658,17 @@ namespace ZNsMain
|
|||||||
TypeCharC* VP_Right=rhs.mp_TypeChar;
|
TypeCharC* VP_Right=rhs.mp_TypeChar;
|
||||||
|
|
||||||
#if(_CODE_OLD_)
|
#if(_CODE_OLD_)
|
||||||
TypeChar VC_Minus=0;
|
TypeChar VC_Minus = 0;
|
||||||
#else
|
#else
|
||||||
int VI_Minus=0; // 페이지 하단의 'char 의 int 확장에 따른 문제의 코드' 참고.
|
int VI_Minus = 0; // 페이지 하단의 'char 의 int 확장에 따른 문제의 코드' 참고.
|
||||||
#endif
|
#endif
|
||||||
TypeLength VL_Index=0;
|
TypeLength VL_Index = 0;
|
||||||
TypeLength VL_Loop =(ml_TypeLength<=rhs.ml_TypeLength ? ml_TypeLength : rhs.ml_TypeLength) ;
|
TypeLength VL_Loop = /*::::::::::::::::::::::::::*/
|
||||||
|
( ml_TypeLength <= rhs.ml_TypeLength ?
|
||||||
|
this->ml_TypeLength :
|
||||||
|
rhs. ml_TypeLength
|
||||||
|
) ;
|
||||||
|
/*::::::::::::::::::::::::::::::::::::::::::::::::*/
|
||||||
|
|
||||||
while(VL_Index<VL_Loop)
|
while(VL_Index<VL_Loop)
|
||||||
{
|
{
|
||||||
|
@ -159,7 +159,7 @@ namespace ZNsMain
|
|||||||
template<typename TDeriveString> class ZtCHelpBase
|
template<typename TDeriveString> class ZtCHelpBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef ZNsMain::ZtCList< /////////////////////
|
typedef ZNsMain::ZtCBaseList< /////////////////
|
||||||
TDeriveString ,
|
TDeriveString ,
|
||||||
const TDeriveString&,
|
const TDeriveString&,
|
||||||
TAlloc
|
TAlloc
|
||||||
@ -204,7 +204,7 @@ namespace ZNsMain
|
|||||||
class ZCSearchInfo*/
|
class ZCSearchInfo*/
|
||||||
|
|
||||||
|
|
||||||
typedef ZNsMain::ZtCList ////////////////////////
|
typedef ZNsMain::ZtCBaseList ////////////////////
|
||||||
<
|
<
|
||||||
ZCSearchInfo, const ZCSearchInfo&, TAlloc
|
ZCSearchInfo, const ZCSearchInfo&, TAlloc
|
||||||
>
|
>
|
||||||
@ -321,7 +321,7 @@ namespace ZNsMain
|
|||||||
)
|
)
|
||||||
/*########################################################*/
|
/*########################################################*/
|
||||||
{
|
{
|
||||||
// TPosList : ZNsMain::ZtCList<TypeLength> etc
|
// TPosList : ZNsMain::ZtCBaseList<TypeLength> etc
|
||||||
|
|
||||||
if(0 > AL_Offset) AL_Offset=0 ;
|
if(0 > AL_Offset) AL_Offset=0 ;
|
||||||
if(this->size() <= AL_Offset) return ;
|
if(this->size() <= AL_Offset) return ;
|
||||||
@ -457,7 +457,7 @@ namespace ZNsMain
|
|||||||
)
|
)
|
||||||
/*#######################################################################*/
|
/*#######################################################################*/
|
||||||
{
|
{
|
||||||
// TPosList : ZNsMain::ZtCList<TypeLength> etc
|
// TPosList : ZNsMain::ZtCBaseList<TypeLength> etc
|
||||||
// AL_Replace : APC_Replace 의 길이
|
// AL_Replace : APC_Replace 의 길이
|
||||||
// AL_Searched : 이전에 찾은 길이
|
// AL_Searched : 이전에 찾은 길이
|
||||||
|
|
||||||
@ -1833,11 +1833,11 @@ namespace ZNsMain
|
|||||||
if(this->size() <= AL_Offset) return *this;
|
if(this->size() <= AL_Offset) return *this;
|
||||||
if(this->size() < 1 ) return *this;
|
if(this->size() < 1 ) return *this;
|
||||||
|
|
||||||
ZtCList<TypeLength> VO_CPosCList; FindPosToList
|
ZtCBaseList<TypeLength> VO_CPosCList; FindPosToList
|
||||||
(
|
(
|
||||||
RR(VO_CPosCList), APC_Search, AL_Search, AL_Offset
|
RR(VO_CPosCList), APC_Search, AL_Search, AL_Offset
|
||||||
);
|
);
|
||||||
/*////////////////////////////////////////////*/
|
/*////////////////////////////////////////////////*/
|
||||||
|
|
||||||
return ReplaceByPosList /*::::::::::::::::::::::::::::*/
|
return ReplaceByPosList /*::::::::::::::::::::::::::::*/
|
||||||
(
|
(
|
||||||
|
@ -75,13 +75,13 @@ namespace ZNsMain
|
|||||||
|
|
||||||
/* 아래 자료형에 대해, CStringBase::Fetch() 호출 여부 실험.
|
/* 아래 자료형에 대해, CStringBase::Fetch() 호출 여부 실험.
|
||||||
|
|
||||||
ZtCList<CStringBase&, CCStringBase&>
|
ZtCBaseList<CStringBase&, CCStringBase&>
|
||||||
ZtCList<CStringBase&, CCCStringBase&>
|
ZtCBaseList<CStringBase&, CCCStringBase&>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
typedef ZtCList
|
typedef ZtCBaseList
|
||||||
<CStringBase, CStringBase&> CStringList1 ;
|
<CStringBase, CStringBase&> CStringList1 ;
|
||||||
typedef ZtCList
|
typedef ZtCBaseList
|
||||||
<CStringBase, CCStringBase&> CStringList2 ;
|
<CStringBase, CCStringBase&> CStringList2 ;
|
||||||
|
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ namespace ZNsMain
|
|||||||
/*///////////////////////////////////*/
|
/*///////////////////////////////////*/
|
||||||
|
|
||||||
|
|
||||||
typedef ZtCList<int> CIntList;
|
typedef ZtCBaseList<int> CIntList;
|
||||||
|
|
||||||
CHelpObj VO_CHelpObj;
|
CHelpObj VO_CHelpObj;
|
||||||
CIntList VO_CIntList;
|
CIntList VO_CIntList;
|
||||||
@ -178,16 +178,16 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/
|
|||||||
|
|
||||||
■ cygwin 컴파일
|
■ cygwin 컴파일
|
||||||
|
|
||||||
// g++ -mno-cygwin -o ZtCList_000.exe ZtCList_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
// g++ -mno-cygwin -o ZtCBaseList_000.exe ZtCBaseList_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300
|
||||||
// g++ -mno-cygwin -o ZtCList_000_D.exe ZtCList_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
// g++ -mno-cygwin -o ZtCBaseList_000_D.exe ZtCBaseList_000.cpp -I../../my_CPP/CPP_Main/ -I../../my_CPP/CPP_Std/ -D__CYGWIN32__ -D__VISUAL_CPP_VER__=200300 -D_DEBUG
|
||||||
|
|
||||||
■ mingw 컴파일
|
■ mingw 컴파일
|
||||||
|
|
||||||
g++.exe -o ZtCList_000_mw.exe ZtCList_000.cpp -I../ -lWs2_32
|
g++.exe -o ZtCBaseList_000_mw.exe ZtCBaseList_000.cpp -I../ -lWs2_32
|
||||||
g++.exe -o ZtCList_000_mw_D.exe ZtCList_000.cpp -I../ -lWs2_32 -D_DEBUG
|
g++.exe -o ZtCBaseList_000_mw_D.exe ZtCBaseList_000.cpp -I../ -lWs2_32 -D_DEBUG
|
||||||
|
|
||||||
./ZtCList_000_mw.exe
|
./ZtCBaseList_000_mw.exe
|
||||||
./ZtCList_000_mw_D.exe
|
./ZtCBaseList_000_mw_D.exe
|
||||||
|
|
||||||
|
|
||||||
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
|
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
|
||||||
@ -204,8 +204,8 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/
|
|||||||
|
|
||||||
■ Linux 컴파일
|
■ Linux 컴파일
|
||||||
|
|
||||||
g++ -std=c++98 -o ZtCList_000.exe ZtCList_000.cpp -I../
|
g++ -std=c++98 -o ZtCBaseList_000.exe ZtCBaseList_000.cpp -I../
|
||||||
g++ -std=c++98 -o ZtCList_000_D.exe ZtCList_000.cpp -I../ -D_DEBUG
|
g++ -std=c++98 -o ZtCBaseList_000_D.exe ZtCBaseList_000.cpp -I../ -D_DEBUG
|
||||||
|
|
||||||
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ gcc --version
|
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ gcc --version
|
||||||
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
|
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
|
||||||
@ -242,7 +242,7 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/
|
|||||||
|
|
||||||
■ 실행
|
■ 실행
|
||||||
|
|
||||||
./ZtCList_000.exe
|
./ZtCBaseList_000.exe
|
||||||
./ZtCList_000_D.exe
|
./ZtCBaseList_000_D.exe
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////*/
|
////////////////////////////////////////////////////////////////////////////////////////*/
|
Reference in New Issue
Block a user