diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 2ce6eda..755816f 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -2375,16 +2375,16 @@ namespace ZNsMain template class ZtCTypeData { public: typedef TType TypeData; - static TType& GetObjRef(TType& AR_Type ){return AR_Type;}}; + static TType& GetObjRef(TType& AR_Type){return AR_Type ;}}; template class ZtCTypeData { public: typedef TType TypeData; static TType& GetObjRef(TType* AP_Type){return *AP_Type;}}; template class ZtCTypeData { public: typedef TType TypeData; - static TType& GetObjRef(TType& AR_Type ){return AR_Type;}}; + static TType& GetObjRef(TType& AR_Type){return AR_Type ;}}; template<> class ZtCTypeData { public: typedef void* TypeData; - static void* GetObjRef(void* AP_Void){return AP_Void;}}; + static void* GetObjRef(void* AP_Void){return AP_Void ;}}; /*//////////////////////////////////////////////////////////////////////////////// diff --git a/ZCppMain/ZtCArray.H b/ZCppMain/ZtCArray.H index 00d8bc4..d14ac15 100644 --- a/ZCppMain/ZtCArray.H +++ b/ZCppMain/ZtCArray.H @@ -455,10 +455,6 @@ namespace ZNsMain 형태를 사용하면 좋을 것 같다. -- 2014-06-16 23:11:00 - - 지금은 AO_TypeHelp 도 ZtCTypeData<> 을 이용해, 최대한 참조로 받을 수 있게 - 하고 있다. -- 2021-03-08 20:31 - /////////////////////////////////////////////////////////////////////////////*/ @@ -472,7 +468,7 @@ namespace ZNsMain { ZNsMain::ZtCTypeData::GetObjRef(AO_Functor) ( - *VP_TypeArr, ZCTypeHelp::GetObjRef(AO_TypeHelp) + *VP_TypeArr, AO_TypeHelp ); ++VP_TypeArr; /////////////////////////////////////// }/* @@ -502,25 +498,15 @@ namespace ZNsMain 형태를 사용하면 좋을 것 같다. -- 2014-06-16 23:11:00 - - 지금은 AO_TypeHelp1, 2 도 ZtCTypeData<> 을 이용해, 최대한 참조로 받을 수 있 - 게 하고 있다. -- 2021-03-08 20:31 - /////////////////////////////////////////////////////////////////////////////*/ - typedef ZNsMain::ZtCTypeData ZCTypeHelp1; - typedef ZNsMain::ZtCTypeData ZCTypeHelp2; - - Type* VP_TypeArr = mp_TypeArr; __for0(TypeSize, i, ml_UseSize) { ZNsMain::ZtCTypeData::GetObjRef(AO_Functor) ( - *VP_TypeArr - , ZCTypeHelp1::GetObjRef(AO_TypeHelp1) - , ZCTypeHelp2::GetObjRef(AO_TypeHelp2) + *VP_TypeArr, AO_TypeHelp1, AO_TypeHelp2 ); ++VP_TypeArr; /////////////////////////////////////// }/* diff --git a/ZCppMain/ZtCObjList.H b/ZCppMain/ZtCObjList.H index 692b530..92c13d3 100644 --- a/ZCppMain/ZtCObjList.H +++ b/ZCppMain/ZtCObjList.H @@ -1524,23 +1524,15 @@ namespace ZNsMain 형태를 사용하면 좋을 것 같다. -- 2014-06-16 23:11:00 - - 지금은 AO_TypeHelp 도 ZtCTypeData<> 을 이용해, 최대한 참조로 받을 수 있게 - 하고 있다. -- 2021-03-08 20:31 - /////////////////////////////////////////////////////////////////////////////*/ - typedef ZNsMain:: - ZtCTypeData ZCTypeHelp; - - ZCLink* VP_LoopLink=mp_HeadLink; __for0(int, i, ml_Size) { ZtCTypeData::GetObjRef(AO_Functor) ( - VP_LoopLink->mo_Type, ZCTypeHelp::GetObjRef(AO_TypeHelp) + VP_LoopLink->mo_Type, AO_TypeHelp ); //////////////////////////////////////////// @@ -1575,26 +1567,17 @@ namespace ZNsMain 형태를 사용하면 좋을 것 같다. -- 2014-06-16 23:11:00 - - 지금은 AO_TypeHelp1, 2 도 ZtCTypeData<> 을 이용해, 최대한 참조로 받을 수 있 - 게 하고 있다. -- 2021-03-08 20:31 - /////////////////////////////////////////////////////////////////////////////*/ - typedef ZNsMain::ZtCTypeData ZCTypeHelp1; - typedef ZNsMain::ZtCTypeData ZCTypeHelp2; - - ZCLink* VP_LoopLink=mp_HeadLink; __for0(int, i, ml_Size) { ZtCTypeData::GetObjRef(AO_Functor) ( - VP_LoopLink->mo_Type - , ZCTypeHelp1::GetObjRef(AO_TypeHelp1) - , ZCTypeHelp2::GetObjRef(AO_TypeHelp2) + VP_LoopLink->mo_Type, AO_TypeHelp1, AO_TypeHelp2 ); + //////////////////////////////////////////// /* 위 코드로 인해서, AO_Functor 이 함수일 때 뿐이 아니라, operator() 연산자를 가진 object 포인터일 때도 사용할 수 있게 되었다. */ diff --git a/ZCppMain/test.cpp b/ZCppMain/test.cpp index 64537b3..44f4bfa 100644 --- a/ZCppMain/test.cpp +++ b/ZCppMain/test.cpp @@ -77,17 +77,17 @@ int main(int ArgiCnt, char** AppArgu) _FFC_(ZCShowData2) _FFS_(ZCShowData3) - (ZTypInt AiInt, ZCTuple& AR_CTuple) + (ZTypInt AiInt, ZCTuple* AP_CTuple) { - cout<<"# Elem3 : "<< AiInt << ", nth=" << AR_CTuple._1++ << endl; + cout<<"# Elem3 : "<< AiInt << ", nth=" << AP_CTuple->_1++ << endl; }/* (ZTypInt AiInt, ZCTuple* AR_CTuple)*/ _FFC_(ZCShowData3) _FFS_(ZCShowData4) - (ZTypInt AiInt, ZCTuple& AR_CTuple) + (ZTypInt AiInt, ZCTuple* AR_CTuple) { - cout<<"# Elem4 : "<< AiInt << ", nth=" << AR_CTuple._1++ << endl; + cout<<"# Elem4 : "<< AiInt << ", nth=" << AP_CTuple->_1++ << endl; }/* (ZTypInt AiInt, ZCTuple* AR_CTuple)*/ _FFC_(ZCShowData4)