commit 2025-10-16 23:16 edit a bit ZCppMain/ZMainHead.H
This commit is contained in:
@ -497,48 +497,48 @@ using namespace std;
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_START0(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_START0(MainObj, IterVar, SizeVar) \
|
||||||
{ \
|
{ \
|
||||||
typedef typename MainType::TypeSize IterTypeSize ; \
|
typedef ZTypLength IterTypeSize ; \
|
||||||
ZNsMain::IterEasyID IterVar = MainObj.ItHID(); \
|
ZNsMain::IterEasyID IterVar = MainObj.ItHID(); \
|
||||||
\
|
\
|
||||||
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_CLOSE0(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_CLOSE0(MainObj, IterVar, SizeVar) \
|
||||||
MainObj.ItNext(IterVar); } \
|
MainObj.ItNext(IterVar); } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_START0_C(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_START0_C(MainObj, IterVar, SizeVar) \
|
||||||
{ \
|
{ \
|
||||||
typedef typename MainType::TypeSize IterTypeSize ; \
|
typedef ZTypLength IterTypeSize ; \
|
||||||
ZNsMain::IterEasyIDc IterVar = MainObj.ItHIDc(); \
|
ZNsMain::IterEasyIDc IterVar = MainObj.ItHIDc(); \
|
||||||
\
|
\
|
||||||
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_CLOSE0_C(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_CLOSE0_C(MainObj, IterVar, SizeVar) \
|
||||||
MainObj.ItNext(IterVar); } \
|
MainObj.ItNext(IterVar); } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_START0_R(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_START0_R(MainObj, IterVar, SizeVar) \
|
||||||
{ \
|
{ \
|
||||||
typedef typename MainType::TypeSize IterTypeSize ; \
|
typedef ZTypLength IterTypeSize ; \
|
||||||
ZNsMain::IterEasyID IterVar = MainObj.ItTID(); \
|
ZNsMain::IterEasyID IterVar = MainObj.ItTID(); \
|
||||||
\
|
\
|
||||||
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_CLOSE0_R(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_CLOSE0_R(MainObj, IterVar, SizeVar) \
|
||||||
MainObj.ItPrev(IterVar); } \
|
MainObj.ItPrev(IterVar); } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_START0_RC(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_START0_RC(MainObj, IterVar, SizeVar) \
|
||||||
{ \
|
{ \
|
||||||
typedef typename MainType::TypeSize IterTypeSize ; \
|
typedef ZTypLength IterTypeSize ; \
|
||||||
ZNsMain::IterEasyIDc IterVar = MainObj.ItTIDc(); \
|
ZNsMain::IterEasyIDc IterVar = MainObj.ItTIDc(); \
|
||||||
\
|
\
|
||||||
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
for(IterTypeSize SizeVar=0; SizeVar<MainObj.size(); ++SizeVar){
|
||||||
|
|
||||||
#define _FOR_ITER_EASY_CLOSE0_RC(MainType, MainObj, IterVar, SizeVar) \
|
#define _FOR_ITER_EASY_CLOSE0_RC(MainObj, IterVar, SizeVar) \
|
||||||
MainObj.ItPrev(IterVar); } \
|
MainObj.ItPrev(IterVar); } \
|
||||||
}
|
}
|
||||||
/*######################################################################
|
/*######################################################################
|
||||||
@ -553,17 +553,17 @@ using namespace std;
|
|||||||
myList.AddTail(2);
|
myList.AddTail(2);
|
||||||
myList.AddTail(3);
|
myList.AddTail(3);
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0 (CObjList, myList, VH_NowIter, i)
|
_FOR_ITER_EASY_START0 (myList, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list : "<<myList.ItD(VH_NowIter)<<endl;
|
cout<<"# list : "<<myList.ItD(VH_NowIter)<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0 (CObjList, myList, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0 (myList, VH_NowIter, i)
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0_RC(CObjList, myList, VH_NowIter, i)
|
_FOR_ITER_EASY_START0_RC(myList, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list rev const: "<<myList.ItD(VH_NowIter)<<endl;
|
cout<<"# list rev const: "<<myList.ItD(VH_NowIter)<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0_RC(CObjList, myList, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0_RC(myList, VH_NowIter, i)
|
||||||
|
|
||||||
-- 2025-10-14 16:34
|
-- 2025-10-14 16:34
|
||||||
|
|
||||||
|
@ -696,18 +696,18 @@ namespace ZNsMain
|
|||||||
}
|
}
|
||||||
cout<<"*****************************************************"<<endl;
|
cout<<"*****************************************************"<<endl;
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0_C(ZCBaseListEx10, VO_ZCBaseListEx10_2, VH_NowIter, i)
|
_FOR_ITER_EASY_START0_C (VO_ZCBaseListEx10_2, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list10_2 const: "<<(i+1)<<" "<<VO_ZCBaseListEx10_2.ItD(VH_NowIter)<<endl;
|
cout<<"# list10_2 const: "<<(i+1)<<" "<<VO_ZCBaseListEx10_2.ItD(VH_NowIter)<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0_C(ZCLinkStrList, VO_ZCBaseListEx10_2, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0_C (VO_ZCBaseListEx10_2, VH_NowIter, i)
|
||||||
cout<<"*****************************************************"<<endl;
|
cout<<"*****************************************************"<<endl;
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0_RC(ZCBaseListEx10, VO_ZCBaseListEx10_2, VH_NowIter, i)
|
_FOR_ITER_EASY_START0_RC(VO_ZCBaseListEx10_2, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list10_2 rev const: "<<(i+1)<<" "<<VO_ZCBaseListEx10_2.ItD(VH_NowIter)<<endl;
|
cout<<"# list10_2 rev const: "<<(i+1)<<" "<<VO_ZCBaseListEx10_2.ItD(VH_NowIter)<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0_RC(ZCLinkStrList, VO_ZCBaseListEx10_2, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0_RC(VO_ZCBaseListEx10_2, VH_NowIter, i)
|
||||||
cout<<"*****************************************************"<<endl;
|
cout<<"*****************************************************"<<endl;
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,18 +258,18 @@ namespace ZNsMain
|
|||||||
cout<<"***********************************************"<<endl;
|
cout<<"***********************************************"<<endl;
|
||||||
|
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0_C(ZCLinkDataList, VO_CDataList1, VH_NowIter, i)
|
_FOR_ITER_EASY_START0_C (VO_CDataList1, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list1 const: "<<(i+1)<<" "<<VO_CDataList1.ItD(VH_NowIter).GetData()<<endl;
|
cout<<"# list1 const: "<<(i+1)<<" "<<VO_CDataList1.ItD(VH_NowIter).GetData()<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0_C(ZCLinkDataList, VO_CDataList1, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0_C (VO_CDataList1, VH_NowIter, i)
|
||||||
cout<<"***********************************************"<<endl;
|
cout<<"***********************************************"<<endl;
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0_RC(ZCLinkDataList, VO_CDataList1, VH_NowIter, i)
|
_FOR_ITER_EASY_START0_RC(VO_CDataList1, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list1 rev const: "<<(i+1)<<" "<<VO_CDataList1.ItD(VH_NowIter).GetData()<<endl;
|
cout<<"# list1 rev const: "<<(i+1)<<" "<<VO_CDataList1.ItD(VH_NowIter).GetData()<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0_RC(ZCLinkDataList, VO_CDataList1, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0_RC(VO_CDataList1, VH_NowIter, i)
|
||||||
cout<<"***********************************************"<<endl;
|
cout<<"***********************************************"<<endl;
|
||||||
|
|
||||||
|
|
||||||
@ -283,11 +283,11 @@ namespace ZNsMain
|
|||||||
cout<<"# list20 __for_it : "<<VH_NowIter.GetPos()<<" "<<(*VH_NowIter)<<endl;
|
cout<<"# list20 __for_it : "<<VH_NowIter.GetPos()<<" "<<(*VH_NowIter)<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
_FOR_ITER_EASY_START0_C(ZCLinkStrList, VO_CStrLis20, VH_NowIter, i)
|
_FOR_ITER_EASY_START0_C(VO_CStrLis20, VH_NowIter, i)
|
||||||
{
|
{
|
||||||
cout<<"# list20 const: "<<(i+1)<<" "<<VO_CStrLis20.ItD(VH_NowIter)<<endl;
|
cout<<"# list20 const: "<<(i+1)<<" "<<VO_CStrLis20.ItD(VH_NowIter)<<endl;
|
||||||
}
|
}
|
||||||
_FOR_ITER_EASY_CLOSE0_C(ZCLinkStrList, VO_CStrLis20, VH_NowIter, i)
|
_FOR_ITER_EASY_CLOSE0_C(VO_CStrLis20, VH_NowIter, i)
|
||||||
cout<<"***********************************************"<<endl;
|
cout<<"***********************************************"<<endl;
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,8 +464,8 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/
|
|||||||
|
|
||||||
■ mingw 컴파일
|
■ mingw 컴파일
|
||||||
|
|
||||||
g++.exe -o ZtCObjList_000_mw.exe ZtCObjList_000.cpp -I../ -lWs2_32
|
g++.exe -o ZtCObjList_000_mw.exe ZtCObjList_000.cpp -I../ -lWs2_32 -Wall -Wno-unused-function -Wno-misleading-indentation -Wno-reorder -Wno-unknown-pragmas
|
||||||
g++.exe -o ZtCObjList_000_mw_D.exe ZtCObjList_000.cpp -I../ -lWs2_32 -D_DEBUG
|
g++.exe -o ZtCObjList_000_mw_D.exe ZtCObjList_000.cpp -I../ -lWs2_32 -Wall -Wno-unused-function -Wno-misleading-indentation -Wno-reorder -Wno-unknown-pragmas -D_DEBUG
|
||||||
|
|
||||||
./ZtCObjList_000_mw.exe
|
./ZtCObjList_000_mw.exe
|
||||||
./ZtCObjList_000_mw_D.exe
|
./ZtCObjList_000_mw_D.exe
|
||||||
|
Reference in New Issue
Block a user