edit test.cpp
This commit is contained in:
@ -2382,7 +2382,7 @@ namespace ZNsMain
|
|||||||
template<typename TType> class ZtCTypeData<TType&>
|
template<typename TType> class ZtCTypeData<TType&>
|
||||||
{ public: typedef TType TypeData;
|
{ 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<void*>
|
template< > class ZtCTypeData<void* >
|
||||||
{ public: typedef void* TypeData;
|
{ public: typedef void* TypeData;
|
||||||
static void* GetObjRef(void* AP_Void){return AP_Void ;}};
|
static void* GetObjRef(void* AP_Void){return AP_Void ;}};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#define __ZTCARRAY_H__
|
#define __ZTCARRAY_H__
|
||||||
|
|
||||||
|
|
||||||
#include "ZMainHead.H"
|
#include "ZCppMain/ZMainHead.H"
|
||||||
|
|
||||||
|
|
||||||
namespace ZNsMain
|
namespace ZNsMain
|
||||||
|
@ -565,8 +565,8 @@ namespace ZNsMain
|
|||||||
ZCLink*& APR_TailLink
|
ZCLink*& APR_TailLink
|
||||||
/*///////////*/ ) const
|
/*///////////*/ ) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
std::CCheckAlloc::CAllowAlloc VO_CAllowAllocObj;
|
ZNsMain::ZCCheckAlloc::ZCAllowAlloc VO_CAllowAllocObj;
|
||||||
#endif //_DEBUG
|
#endif //_DEBUG
|
||||||
|
|
||||||
APR_HeadLink=new ZCLink; ZCLink* VP_TempLink=APR_HeadLink;
|
APR_HeadLink=new ZCLink; ZCLink* VP_TempLink=APR_HeadLink;
|
||||||
@ -595,9 +595,9 @@ namespace ZNsMain
|
|||||||
{
|
{
|
||||||
// AL_FarNum 의 절대값 + 1 개의 링크가 생성된다.
|
// AL_FarNum 의 절대값 + 1 개의 링크가 생성된다.
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
std::CCheckAlloc::CAllowAlloc VO_CAllowAllocObj;
|
ZNsMain::ZCCheckAlloc::ZCAllowAlloc VO_CAllowAllocObj;
|
||||||
#endif
|
#endif //_DEBUG
|
||||||
|
|
||||||
if(AL_FarNum>0)
|
if(AL_FarNum>0)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "ZtCArray.H"
|
#include "ZCppMain/ZtCArray.H"
|
||||||
#include "ZtCObjList.H"
|
#include "ZCppMain/ZtCObjList.H"
|
||||||
|
|
||||||
|
|
||||||
using namespace std ;
|
using namespace std ;
|
||||||
@ -30,6 +30,15 @@ namespace ZNsMain{namespace ZNsHide
|
|||||||
namespace ZNsHide*/}/*namespace ZNsMain*/
|
namespace ZNsHide*/}/*namespace ZNsMain*/
|
||||||
|
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
class ZtCMy
|
||||||
|
{ public: enum{EMyNum=1}; };
|
||||||
|
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
class ZtCMy< ZNsMain::ZtCObjList<T> >
|
||||||
|
{ public: enum{EMyNum=2}; };
|
||||||
|
|
||||||
|
|
||||||
int main(int ArgiCnt, char** AppArgu)
|
int main(int ArgiCnt, char** AppArgu)
|
||||||
{
|
{
|
||||||
@ -39,6 +48,15 @@ int main(int ArgiCnt, char** AppArgu)
|
|||||||
typedef ZNsMain::ZtCObjList<int> CListByInt;
|
typedef ZNsMain::ZtCObjList<int> CListByInt;
|
||||||
typedef ZNsMain::ZtCArray <int> CArrayInt ;
|
typedef ZNsMain::ZtCArray <int> CArrayInt ;
|
||||||
|
|
||||||
|
typedef ZtCMy<int> CMy1;
|
||||||
|
typedef ZtCMy<CListByInt> CMy2;
|
||||||
|
typedef ZtCMy<CArrayInt > CMy3;
|
||||||
|
|
||||||
|
cout<<"# CMy1::EMyNum="<<CMy1::EMyNum<<endl;
|
||||||
|
cout<<"# CMy2::EMyNum="<<CMy2::EMyNum<<endl;
|
||||||
|
cout<<"# CMy3::EMyNum="<<CMy3::EMyNum<<endl;
|
||||||
|
|
||||||
|
|
||||||
CListByInt VO_IntList;
|
CListByInt VO_IntList;
|
||||||
CArrayInt VO_IntArr ;
|
CArrayInt VO_IntArr ;
|
||||||
|
|
||||||
@ -103,6 +121,8 @@ int main(int ArgiCnt, char** AppArgu)
|
|||||||
VO_IntArr .IterElement(&VO_CFunctor1 ); VO_CTuple._1=1 ;
|
VO_IntArr .IterElement(&VO_CFunctor1 ); VO_CTuple._1=1 ;
|
||||||
VO_IntArr .IterElement(ZCShowData4::Exec, &VO_CTuple);
|
VO_IntArr .IterElement(ZCShowData4::Exec, &VO_CTuple);
|
||||||
|
|
||||||
|
cout<< "# Press Any Key to exit" << endl; cin.get();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}/*
|
}/*
|
||||||
int main(int ArgiCnt, char** AppArgu)*/
|
int main(int ArgiCnt, char** AppArgu)*/
|
||||||
|
Reference in New Issue
Block a user