commit 2025-09-27 00:58 add ZtCTypeData< ZtCRef<TType> > and ZtCTypeData< ZtCRef<TType>* >

This commit is contained in:
2025-09-27 00:58:21 +09:00
parent 3cbcc8df6c
commit 9ca7dd3a90
3 changed files with 61 additions and 16 deletions

View File

@ -1211,6 +1211,18 @@ namespace ZNsMain
{ public: typedef ZfpNone TypeData;
static ZfpNone GetObjRef(void* AP_Void){return ZfNone ;}};
template<typename TType> class ZtCTypeData< ZtCRef<TType> >
{ public: typedef TType TypeData; static TType&
GetObjRef(ZtCRef<TType>& AR_CRef)
{return AR_CRef.GetData() /*//////////////*/ ;}
};
template<typename TType> class ZtCTypeData< ZtCRef<TType>* >
{ public: typedef TType TypeData; static TType&
GetObjRef(ZtCRef<TType>* AP_CRef)
{return *reinterpret_cast<TypeData*>(AP_CRef);}
};
template<typename TType> class ZtCTD
{ public: typedef TType TypeData;
static TType& GetObjRef(TType& AR_Type){return AR_Type ;}
@ -1229,6 +1241,21 @@ namespace ZNsMain
static ZfpNone GOR (void* AP_Void){return ZfNone ;}};
template<typename TType> class ZtCTD< ZtCRef<TType> >
{ public: typedef TType TypeData;
static TType& GetObjRef(ZtCRef<TType>& AR_CRef){return AR_CRef.GetData() ;}
static TType& GOR (ZtCRef<TType>& AR_CRef){return AR_CRef.GetData() ;}
};
template<typename TType> class ZtCTD< ZtCRef<TType>* >
{ public: typedef TType TypeData;
static TType& GetObjRef(ZtCRef<TType>* AP_CRef)
{return *reinterpret_cast<TypeData*>(AP_CRef);}
static TType& GOR (ZtCRef<TType>* AP_CRef)
{return *reinterpret_cast<TypeData*>(AP_CRef);}
};
/*/////////////////////////////////////////////////////////////////////////////////////////////
■ template 인수가 Type11 까지 있음에 주의한다. 그러면 Type10 까지 전문화할 수 있는 것이다.

View File

@ -2328,6 +2328,8 @@ namespace ZNsMain
/* 위 코드로 인해서, AO_Functor 이 함수일 때 뿐이 아니라,
operator() 연산자를 가진 object 포인터일 때도 사용할 수
있게 되었다.
이제는 ZftMCP() 템플릿 함수를 사용해도 된다. -- 2025-09-27 00:38
*/
VP_LoopLink = VP_LoopLink->mp_NextLink ;
}/*