commit 2025-10-25 13:35 add ZtCObjtInitChain in ZCppMain/ZMainHead.H
This commit is contained in:
@ -257,6 +257,29 @@ namespace ZNsMain
|
||||
cout<<"************************************"<<endl;
|
||||
|
||||
|
||||
typedef ZtCObjtInitChain
|
||||
<
|
||||
char , ZCInitZero, ZtCObjtInitChain<
|
||||
string, ZCEmpty , ZtCObjtInitChain<
|
||||
double, ZCInitZero, ZtCObjtInitChain<
|
||||
int , ZCInitZero,
|
||||
ZCEmpty> > >
|
||||
> ZCObjtInitChain; ZCObjtInitChain VO_ZCObjtInitChain;
|
||||
|
||||
cout<<"# VO_ZCObjtInitChain : use cout"<<endl;
|
||||
cout<<VO_ZCObjtInitChain<<endl;
|
||||
cout<<"************************************"<<endl;
|
||||
|
||||
*VO_ZCObjtInitChain.GetChainByNo<0>()='A';
|
||||
*VO_ZCObjtInitChain.GetChainByNo<1>()=string("ABC");
|
||||
*VO_ZCObjtInitChain.GetChainByNo<2>()=1.2;
|
||||
*VO_ZCObjtInitChain.GetChainByNo<3>()=999;
|
||||
|
||||
cout<<"# VO_ZCObjtInitChain : use IterElement & ZCPrint()"<<endl;
|
||||
VO_ZCObjtInitChain.IterElement(ZCPrint()); cout<<endl;
|
||||
cout<<"************************************"<<endl;
|
||||
|
||||
|
||||
typedef ZtCDataRing<std::string> ZCDataRing;
|
||||
|
||||
ZCDataRing VO_CDataRing = string("123");
|
||||
@ -280,10 +303,10 @@ namespace ZNsMain
|
||||
VO_CDataRing.IterThisRev(&ZftPrint<string>); cout<<endl;
|
||||
cout<<"************************************"<<endl;
|
||||
cout<<"# VO_CDataRing IterThisRev(HelpType char(',')) = "<<endl;
|
||||
VO_CDataRing.IterThisRev(&ZftPrint<string, char>, char(',')); cout<<endl;
|
||||
VO_CDataRing.IterThisRev(&ZftPrint2<string, char>, char(',')); cout<<endl;
|
||||
cout<<"************************************"<<endl;
|
||||
cout<<"# VO_CDataRing IterTail(HelpType char(',')) = "<<endl;
|
||||
VO_CDataRing.IterTail (&ZftPrint<string, char>, char(',')); cout<<endl;
|
||||
VO_CDataRing.IterTail (&ZftPrint2<string, char>, char(',')); cout<<endl;
|
||||
cout<<"************************************"<<endl;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user