From 3b17e42092ffe076680f8a815b9dfb1192d16ccd Mon Sep 17 00:00:00 2001 From: sauron Date: Thu, 4 Mar 2021 16:10:09 +0900 Subject: [PATCH] edit test.cpp --- ZCppMain/ZtCObjList.H | 22 ++++++++++++++++++++++ ZCppMain/test.cpp | 37 ++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/ZCppMain/ZtCObjList.H b/ZCppMain/ZtCObjList.H index 3a28487..2044dd0 100644 --- a/ZCppMain/ZtCObjList.H +++ b/ZCppMain/ZtCObjList.H @@ -1564,6 +1564,28 @@ namespace ZNsMain void IterElemRef(TFunctor AO_Functor, TTypeHelp& AR_TypeHelp) */ + template + void IterElemRef(TFunctor AO_Functor, + TTypeHelp1& AR_TypeHelp1, TTypeHelp2& AR_TypeHelp2) + { + /* TTypeHelp1 과 2 을 참조로 받고 있음에 주의한다. -- 2021-03-04 04:00:00 */ + + ZCLink* VP_LoopLink=mp_HeadLink; + + __for0(int, i, ml_Size) + { + ZtCTypeData::GetObjRef(AO_Functor) + ( VP_LoopLink->mo_Type, AR_TypeHelp1, AR_TypeHelp2 ); + + VP_LoopLink = VP_LoopLink->mp_NextLink ; + }/* + __for0(int, i, ml_Size)*/ + }/* + template + void IterElemRef(TFunctor AO_Functor, + TTypeHelp1& AR_TypeHelp1, TTypeHelp2& AR_TypeHelp2) */ + + /*/////////////////////////////////////////////////////////////////////////// ■ IterElement() 예제. diff --git a/ZCppMain/test.cpp b/ZCppMain/test.cpp index 968302d..126afcc 100644 --- a/ZCppMain/test.cpp +++ b/ZCppMain/test.cpp @@ -46,36 +46,35 @@ int main(int ArgiCnt, char** AppArgu) VO_IntList.AddTail(9); - _FFS_(ZCShowData) + typedef ZtStTuple ZCTuple; + + ZCTuple VO_CTuple; VO_CTuple._1 = 1; + + + _FFS_(ZCShowData1) (ZTypInt AiInt) { cout<<"# Elem : "<< AiInt << endl; }/* (ZTypInt AiInt)*/ - _FFC_(ZCShowData) + _FFC_(ZCShowData1) - class ZCFunctor1 - { - private: - ZTypInt mi_Index; - public : - - ZCFunctor1(){mi_Index=0;} - - void operator()(int ArgiValue) - { cout<<"# index="<<++mi_Index<<", Value="<