commit 2025-10-07 19:40 add CopyThis() in ZCppMain/ZtCLinkList.H
This commit is contained in:
@ -39,6 +39,16 @@ namespace ZNsMain
|
||||
mo_DataCStr(rhs.mo_DataCStr)
|
||||
{cout<<"* ZCLinkData(const ZCLinkData& rhs) : "<<++ZCLinkData::SI_CallCnt<<endl;}
|
||||
|
||||
ZCLinkData(const TypeBase& rhs) :
|
||||
ZNsIFaceEx::
|
||||
ZtCLink<ZCEmpty, ZCLinkData>(),
|
||||
mo_DataCStr
|
||||
(
|
||||
(*static_cast<const ZCLinkData*>(&rhs)).mo_DataCStr
|
||||
)
|
||||
{cout<<"* ZCLinkData(const TypeBase& rhs) : "<<++ZCLinkData::SI_CallCnt<<endl;}
|
||||
|
||||
|
||||
ZCLinkData& operator=(const ZCLinkData& rhs)
|
||||
{
|
||||
mo_DataCStr = rhs.mo_DataCStr; return *this;
|
||||
@ -193,6 +203,16 @@ namespace ZNsMain
|
||||
cout<<"***********************************************"<<endl;
|
||||
|
||||
|
||||
VO_ZCLinkStrLis2.CopyThis( RR(VO_ZCLinkStrLis1) );
|
||||
cout<<"# after VO_ZCLinkStrLis2.CopyThis( RR(VO_ZCLinkStrLis1) )"<<endl;
|
||||
|
||||
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
||||
VO_ZCLinkStrLis2.IterElement(&ShowNode0, ZftMCP(VI_CallCnt=0));
|
||||
cout<<"***********************************************"<<endl;
|
||||
VO_ZCLinkStrLis1.IterElement(&ShowNode0, ZftMCP(VI_CallCnt=0));
|
||||
cout<<"***********************************************"<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}/*
|
||||
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)*/
|
||||
|
@ -151,6 +151,16 @@ namespace ZNsMain
|
||||
cout<<"***********************************************"<<endl;
|
||||
|
||||
|
||||
VO_ZCLinkStrLis2.CopyThis(VO_ZCLinkStrLis1);
|
||||
cout<<"# after VO_ZCLinkStrLis2.CopyThis(VO_ZCLinkStrLis1)"<<endl;
|
||||
|
||||
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
|
||||
VO_ZCLinkStrLis2.IterElement(&ShowNode0, ZftMCP(VI_CallCnt=0));
|
||||
cout<<"***********************************************"<<endl;
|
||||
VO_ZCLinkStrLis1.IterElement(&ShowNode0, ZftMCP(VI_CallCnt=0));
|
||||
cout<<"***********************************************"<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}/*
|
||||
static int Main(int AI_ArgCnt=0, char* APP_ArgVal[]=0)*/
|
||||
|
Reference in New Issue
Block a user