Files
RepoMain/ZCppMain/ZMainHead.H

4762 lines
192 KiB
C++
Raw Normal View History

2021-02-25 16:23:13 +09:00
/*//////////////////////////////////////////////////////////////////////////////////////
unsigned . signed
'' , '' . 2008-09-14 03:24:00
namespace namespace namespace ZNsConst
.
namespace enum namespace enum namespace ZNsEnum
. enum ,
const char* GetMSG_enum_data_type(int AI_Enum);
const char* GetMSG_enum_data_type(enum_data_type AE_Enum);
.
--
ZNsEnum, ZNsConst namespace enum
.
-- 2010-06-13 22:37:00
namespace
namespace interface namespace ZNsInterface .
interface 'C' 'I' .
릿 class ZtCType
namespace ZNsType .
namespace ZNsExam . 릿
.
릿 Proxy class CProxy
namespace ZNsIProxy .(Interface Proxy) Proxy
CProxy namespace ZNsProxy .
ZNsIProxy ZNsProxy .
namespace ZNsHide
.
릿 ,
릿 , 릿 namespace
namespace ZNsTmpl .
cf) std::ZNsTmpl::FindPos();
(릿) , Decoration ,
, Decoration
namespace ZNsDeco
. Decoration Logic View , View , Logic
() .
릿 ,
,
CHelp~ . Business Logic View
CView~ .
cf) class CHelpIOCP
template main class class template
릿 instance template
public .
template ( main class
.) class friend . main class 릿
.
main class 릿 (
.) friend .
public 릿 public
No Public macro _NP_
, bool
enum std::ZNsEnum::ERun
.
,
, bool
, enum std::ZNsEnum::EAct .
call back 'On' .
'Iter' .
cf) CDoubleList<int>::IterElement();
'Iter' 'OnEach' .
, Init, Fini
. , Init, Fini ,
.
0 InitVar
.
containter class template TypeData type .
CObjList<int>::TypeData
. int TypeData
containter 릿, 릿 ( int)
containter . (릿 )
.
type 릿
TypeData . type Type
.
cf) IN ZNsCPP::CStringSerial_T<>
typedef TTypeCh TypeData ;
typedef TStringType TypeCStringData ;
typedef TStringList TypeCStringList ;
container class template class template
TypeData . 2008-11-05 13:22:00
TString TypeCString TypeString
(?) .
typedef TString TypeCString;
typedef TString TypeString ;
2021-02-25 17:11:44 +09:00
2 . 2008-11-05 13:42:00
2021-02-25 16:23:13 +09:00
template functor . ,
InputIterator& first, InputIterator& last
. object .
for_each InputIterator .
template<class InputIterator, class Function>
Function for_each(InputIterator first, InputIterator last, Function f)
{
while ( first!=last ) f(*first++);
return f;
}
WINDOW UNICODE 3 .
#define _MBCS
#define _UNICODE
#define UNICODE
RTTI typeinfo .
breakpoint assembly
_asm
{
int 3;
}
core file
ulimit -c unlimited
system("ulimit -c unlimited");
Visual C++ 2008 .
#define _WIN32_WINNT 0x0600
-- 2010-04-22 19:55:00
_REENTRANT_EX _REENTRANT thread-safe
, thread-safe .
-- 2011-03-13 01:04:00
//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __MAINHEADER_H__
#define __MAINHEADER_H__
#include <cstdio>
#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include <string>
#include <climits>
#include <typeinfo>
#define _CODE_OLD_ 0
#define _CODE_BAD_ 0
#define _CODE_NEW_ 1
/*/////////////////////////////////////////////////////////////////
_CODE_OLD_ _CODE_NEW_ #if(0) #if(1)
.
-- 2013-07-28 16:21:00
/////////////////////////////////////////////////////////////////*/
#define _COMMENT_ 0 // 주석으로 사용하는 부분.
#if defined(_WIN32) || defined(_WIN64) || defined(_WIN128) || \
defined( WIN32) || defined( WIN64) || defined( WIN128)
#ifndef _WIN
#define _WIN
#endif
#endif/*
defined(_WIN32) || defined(_WIN64) || defined(_WIN128) || \
defined( WIN32) || defined( WIN64) || defined( WIN128) */
#if defined(_WIN64) || defined( WIN64)
#ifndef __CPU_BIT_CNT__
#define __CPU_BIT_CNT__ 64
#endif
#endif /*defined(_WIN64) || defined( WIN64) */
#if defined(_WIN128) || defined( WIN128)
#ifndef __CPU_BIT_CNT__
#define __CPU_BIT_CNT__ 128
#endif
#endif /*defined(_WIN128) || defined(WIN128) */
#if defined(_WIN)
typedef signed char int8_t ;
typedef unsigned char uint8_t ;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#ifndef __VISUAL_CPP_VER__
#define __VISUAL_CPP_VER__ 200800 // 끝 2 자리는 소수점 버전
#endif//__VISUAL_CPP_VER__
#elif defined(__mips__)
typedef signed char int8_t ;
typedef unsigned char uint8_t ;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#else
#include <stdint.h>
#endif
#if defined(_WIN)
#define _STRUCT_PACK_
#ifndef __STD_CALL__
#define __STD_CALL__ __stdcall
#endif
#elif defined(__unix__)
#define _STRUCT_PACK_ __attribute__((packed))
#ifndef __STD_CALL__
#define __STD_CALL__
#endif
#elif defined(__linux__)
#define _STRUCT_PACK_ __attribute__((packed))
#ifndef __STD_CALL__
#define __STD_CALL__
#endif
#else
#define _STRUCT_PACK_ __attribute__((packed))
#ifndef __STD_CALL__
#define __STD_CALL__
#endif
#endif
#ifdef _REENTRANT_EX
#ifndef _REENTRANT
#define _REENTRANT
#endif
#endif
#if defined(_REENTRANT)
#ifndef _REENTRANT_MUTEX
#define _REENTRANT_MUTEX
#endif //_REENTRANT_MUTEX
#define _REENTRANT_BOOL_ 1
#else
#define _REENTRANT_BOOL_ 0
#endif //_REENTRANT
#ifdef _WIN
#pragma warning(disable:4503)
#pragma warning(disable:4786)
#pragma warning(disable:4996)
#pragma warning(disable:4244)
#pragma warning(disable:4267)
#pragma warning(disable:4018)
#pragma warning(disable:4312)
#pragma warning(disable:4290)
#pragma warning(disable:4076)
/*/////////////////////////////////////////////////////////////////////////////
4290 : throw .
warning C4290: __declspec(nothrow) C++ .
warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
-- 2013-07-08 02:39:00
4076 : wchar_t unsigned . .
warning C4076: 'unsigned' : can not be used with type 'wchar_t'
-- 2013-07-08 02:45:00
/////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////
WinSock2.h include , windows.h include .
WinSock2.h , MainHeader include .
TCHAR.H include _MBCS _UNICODE
TCHAR wchar_t , VC++ 6.0 char .
-- 2006-10-12 09:53:00
/////////////////////////////////////////////////////////////////////////////*/
#include <TCHAR.H>
#include <WinSock2.h>
#include <windows.h>
// 아래 pragma 코드가 이미 CNet_Win.H 에 있는데, 필요하면 아래 주석을 제거한다.
//
// #pragma comment(lib, "ws2_32")
#ifndef _T
#define _T(X) X
#endif
#if defined(__VISUAL_CPP_VER__) && __VISUAL_CPP_VER__<200000
// VC++ 6.0 에서는 아래 선언이 필요.
// VC++ 7.0 부터는 주석처리 할 것.
typedef unsigned long ULONG_PTR ;
typedef unsigned long* PULONG_PTR;
#endif //defined(__VISUAL_CPP_VER__) && __VISUAL_CPP_VER__<200000
#else // !defined(_WIN)
#include<errno.h>
#if defined(UNICODE) || defined(_UNICODE)
#define LPCTSTR const wchar_t*
#else
#define LPCTSTR const char*
#endif
#ifndef _T
#define _T(X) X
#endif
#define LONG long
#endif // !defined(_WIN)
#if defined(_REENTRANT)
#if defined(__linux__)
2021-02-25 17:11:44 +09:00
// 리눅스 Multi Thread Programming 에서 ZCObjList 라든가 여러
// 자료구조에서 쓰는 동기화 뮤텍스를 위해 pthread.h 를 포함한다.
2021-02-25 16:23:13 +09:00
#include <pthread.h>
#elif defined(__unix__)
#include <pthread.h>
#elif defined(__sun__) // In Solaris
#include <pthread.h>
#elif defined(_WIN)
//Don't inclucde
#else
#include <pthread.h>
#endif
#endif //defined(_REENTRANT)
#ifdef _DEBUG
#include<iostream>
#include<cstdlib>
#include<fstream>
#endif
using namespace std;
#define RR(RefReceive) RefReceive
// RR 메크로는 인수가 참조를 전달하고 다시 어떤 값으로 설정받는다는 것을 뜻함
#define _NP_
/* 템플릿의 멤버함수가 원래는 public 가 아니어야 하지만,
릿 public . No Public */
#define _VT_
// _VT_ 메크로는 주로 상속해서 사용하는 멤버함수를 의미
#define _SY_
/* 동기화(Sync) 영역에서 호출되는 함수를 의미. 따라서 이 함수안에서
object . */
#define _BETA_
/* beta 테스트 중이거나, 실제로 사용하기에는 기술적인 문제가
. (2011-04-03 21:37:00) */
#ifdef __CYGWIN__
#define atoll atol /*for Cygwin*/
#endif
#define __for0(IntType, i, LoopCount) for(IntType i=0; i< LoopCount; ++i)
#define __for1(IntType, i, LoopCount) for(IntType i=1; i<=LoopCount; ++i)
#define __forD0(i, LoopCount) for(i=0; i< LoopCount; ++i) // 정수형 선언이 미리 있는 경우. D 는 Declare.
#define __forD1(i, LoopCount) for(i=1; i<=LoopCount; ++i)
namespace ZNsMain
{
typedef int ZTypInt ;
typedef int ZTypIntE ; // int enum : 다른 enum 형끼리 비교할 일이 있을 때, 이 자료로 형변환한다.
2021-02-25 17:45:17 +09:00
typedef int ZTypIntEnum ;
2021-02-25 16:23:13 +09:00
typedef long ZTypIntLong ;
typedef short ZTypIntShort;
typedef int ZTypIntI ; // 정수를 가장 잘 대표할 수 있는 자료형. 필요에 따라 long 이나 short 으로 typedef 할 수도 있다.
typedef long ZTypIntL ;
typedef short ZTypIntS ;
2021-02-25 17:49:30 +09:00
typedef long ZTypLong ;
typedef short ZTypShort ;
2021-02-25 16:23:13 +09:00
typedef int8_t ZTypInt8 ;
typedef int16_t ZTypInt16 ;
typedef int32_t ZTypInt32 ;
typedef int64_t ZTypInt64 ;
typedef uint8_t ZTypUInt8 ;
typedef uint16_t ZTypUInt16 ;
typedef uint32_t ZTypUInt32 ;
typedef uint64_t ZTypUInt64 ;
typedef uint8_t ZTypIntU8 ;
typedef uint16_t ZTypIntU16 ;
typedef uint32_t ZTypIntU32 ;
typedef uint64_t ZTypIntU64 ;
#if defined(UNICODE) || defined(_UNICODE)
typedef wchar_t ZTypXCHAR ;
typedef wchar_t ZTypXChar ;
typedef wchar_t* ZTypXPChar ;
typedef const wchar_t* ZTypXCPChar ;
#else
typedef char ZTypXCHAR ;
typedef char ZTypXChar ;
typedef char* ZTypXPChar ;
typedef const char* ZTypXCPChar ;
#endif
typedef char ZTypChar ;
typedef wchar_t ZTypCharW ;
typedef const char ZTypCChar ;
typedef const wchar_t ZTypCCharW ;
typedef char* ZTypPChar ;
typedef const char* ZTypCPChar ;
typedef char* const ZTypPCChar ;
typedef const char* const ZTypCPCChar ;
typedef char* ZTypPCh ;
typedef const char* ZTypCPCh ;
typedef char* const ZTypPCCh ;
typedef const char* const ZTypCPCCh ;
typedef wchar_t* ZTypPWChar ;
typedef const wchar_t* ZTypCPWChar ;
typedef wchar_t* const ZTypPWCChar ;
typedef const wchar_t* const ZTypCPCWChar;
typedef wchar_t* ZTypPWCh ;
typedef const wchar_t* ZTypCPWCh ;
typedef wchar_t* const ZTypPWCCh ;
typedef const wchar_t* const ZTypCPCWCh ;
typedef unsigned char ZTypUChar ;
#if(0)
2021-02-25 17:11:44 +09:00
typedef unsigned wchar_t ZTypUWCha ;
2021-02-25 16:23:13 +09:00
/* VC++ 2012 에서는 여기서 4076 번 경고가 발생한다.
warning C4076: 'unsigned' : can not be used with type 'wchar_t'
Linux g++ 4.4.7 unsigned wchar_t .
*/
#endif
2021-02-25 17:11:44 +09:00
typedef unsigned int ZTypUInt ;
typedef unsigned short ZTypUShort ;
typedef unsigned long ZTypULong ;
2021-02-25 16:23:13 +09:00
2021-02-25 17:11:44 +09:00
typedef unsigned char ZTypIntUChar ;
typedef unsigned int ZTypIntUInt ;
typedef unsigned short ZTypIntUShort ;
typedef unsigned long ZTypIntULong ;
2021-02-25 16:23:13 +09:00
2021-02-25 17:11:44 +09:00
typedef unsigned char ZTypIntUC ;
typedef unsigned int ZTypIntUI ;
typedef unsigned short ZTypIntUS ;
typedef unsigned long ZTypIntUL ;
2021-02-25 16:23:13 +09:00
#if(defined(__CPU_BIT_CNT__) && __CPU_BIT_CNT__>=64)
#ifdef _WIN
2021-02-25 17:34:50 +09:00
typedef __int64 ZTypLength ; // 문자열의 길이를 나타내는 자료형.
// 송수신 버퍼의 크기 자료형으로도 쓰인다.
2021-02-25 16:23:13 +09:00
#else
2021-02-25 17:34:50 +09:00
typedef long ZTypLength ;
2021-02-25 16:23:13 +09:00
#endif
#else // !defined(__CPU_BIT_CNT__) || __CPU_BIT_CNT__<64
2021-02-25 17:34:50 +09:00
typedef long ZTypLength ;
2021-02-25 16:23:13 +09:00
#endif // !defined(__CPU_BIT_CNT__) || __CPU_BIT_CNT__<64
#ifdef _WIN
2021-02-25 17:34:50 +09:00
typedef __int64 ZTypLengthFile; // 파일의 크기를 나타내는 자료형.
2021-02-25 16:23:13 +09:00
#else
2021-02-25 17:34:50 +09:00
typedef long ZTypLengthFile; // 파일의 크기를 나타내는 자료형.
2021-02-25 16:23:13 +09:00
#endif
2021-02-25 17:34:50 +09:00
typedef ZTypLengthFile ZTypLengthF;
2021-02-25 16:23:13 +09:00
2021-02-25 17:11:44 +09:00
#ifdef _WIN
typedef __int64 ZTypLongLong ;
typedef unsigned __int64 ZTypULongLong;
2021-02-25 16:23:13 +09:00
2021-02-25 17:11:44 +09:00
typedef __int64 ZTypIntLLong ;
typedef unsigned __int64 ZTypIntULLong;
#else
typedef long long ZTypLongLong ;
typedef unsigned long long ZTypULongLong;
2021-02-25 16:23:13 +09:00
2021-02-25 17:11:44 +09:00
typedef long long ZTypIntLLong ;
typedef unsigned long long ZTypIntULLong;
#endif
2021-02-25 16:23:13 +09:00
typedef ZTypLongLong ZTypLLong ;
typedef ZTypULongLong ZTypULLong;
typedef ZTypLongLong ZTypIntLL ;
typedef ZTypULongLong ZTypIntULL;
#ifdef _WIN64
typedef __int64 ZTypIntPtr ; // 포인터를 표현하는 정수 크기다.
typedef unsigned __int64 ZTypIntUPtr; // 포인터를 표현하는 양의 정수 크기다.
#else
typedef long ZTypIntPtr ;
typedef unsigned long ZTypIntUPtr;
#endif
#ifdef _WIN32
typedef HANDLE ZTypeID;
#else
typedef int ZTypeID;
#endif
2021-03-04 18:02:17 +09:00
typedef class ZCIterEasy{} IterEasy, *IterEasyID ;
typedef const IterEasyID* IterEasyIDc;
2021-02-25 16:23:13 +09:00
/*///////////////////////////////////////////////////////////////////////////////
typedef class CIterEasy{} *IterEasyID
CObjList<> .
, typedef typename std::CObjList<>::IterEasy IterEasy
.
-- 2013-06-02 08:44:00
CObjList.H , CHttp.H CHttp2.H ZCLink
IterEasyID ,
, .
-- 2013-06-02 12:13:00
CStringEx.H . -- 2013-06-02 09:59:00
IterEasyIDc
typedef const IterEasyID IterEasyIDc;
, IterEasyIDc type (type().nmae() )
IterEasyID type .
-- 2015-11-07 21:34:00
///////////////////////////////////////////////////////////////////////////////*/
class ZCEmpty
{
/*///////////////////////////////////////////////////////////////////////////
릿 .
릿 릿
, type ,
릿 ,
ZCEmpty .
-- 2010-05-04 02:29:00
, 릿 void . ,
, 0
. void , void 릿
.
-- 2012-09-01 17:26:00
///////////////////////////////////////////////////////////////////////////*/
};/*
class ZCEmpty*/
namespace ZNsInterface
{
// 이 이름공간안에 interface 가 되는 class (템플릿) 가 온다.
}/*
namespace ZNsInterface*/
namespace ZNsIFace
{
// 이름공간 ZNsInterface 을 짧게 ZNsIFace 으로도 표기 가능하게 한다.
using namespace ZNsInterface;
}/*
namespace ZNsIFace*/
namespace ZNsEnum
{
// ECompareResult 는 어떤 두 개의 값을 비교한 결과를 표시한다.
// GetCompareCode() 나 class ZZtCCompare<> 에서 사용할 것이다.
2021-03-04 15:36:45 +09:00
enum ZECompareResult
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
ZECompareResult_Equal= 0, // 서로 같다.
ZECompareResult_More = 1, // 왼쪽이 크다.
ZECompareResult_Less =-1 // 오른쪽이 크다.
2021-02-25 16:23:13 +09:00
};/*
2021-03-04 15:36:45 +09:00
enum ZECompareResult*/
2021-02-25 16:23:13 +09:00
}/*
namespace ZNsEnum*/
2021-03-10 16:17:47 +09:00
template<typename TTypeChar, typename TTypeLength> ZTypIntE GetCompareCode
(
2021-02-25 16:23:13 +09:00
const TTypeChar* ApcLeft , TTypeLength AI_LeftLength ,
const TTypeChar* ApcRight, TTypeLength AI_RightLength
2021-03-24 10:37:45 +09:00
)
/*######################################################################*/
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
if(AI_LeftLength<1 && AI_RightLength<1) return ZNsEnum::ZECompareResult_Equal;
2021-02-25 16:23:13 +09:00
TTypeLength ViLoopCnt= (AI_LeftLength<=AI_RightLength ? AI_LeftLength : AI_RightLength);
__for0(TTypeLength, i, ViLoopCnt)
{
2021-03-04 15:36:45 +09:00
if(ApcLeft[i] > ApcRight[i]) return ZNsEnum::ZECompareResult_More;
if(ApcLeft[i] < ApcRight[i]) return ZNsEnum::ZECompareResult_Less;
2021-02-25 16:23:13 +09:00
}/*
__for0(TTypeLength, i, ViLoopCnt)*/
2021-03-04 15:36:45 +09:00
if(AI_LeftLength==AI_RightLength) return ZNsEnum::ZECompareResult_Equal;
if(AI_LeftLength> AI_RightLength) return ZNsEnum::ZECompareResult_More ;
if(AI_LeftLength< AI_RightLength) return ZNsEnum::ZECompareResult_Less ;
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
return ZNsEnum::ZECompareResult_Equal;
2021-02-25 16:23:13 +09:00
}/*
2021-03-10 16:17:47 +09:00
template<typename TTypeChar, typename TTypeLength> ZTypIntE GetCompareCode
(
2021-02-25 16:23:13 +09:00
const TTypeChar* ApcLeft , TTypeLength AI_LeftLength,
const TTypeChar* ApcRight, TTypeLength AI_RightLength
2021-03-24 10:37:45 +09:00
)
########################################################################*/
/* 어떤 변수를 강제적으로 참조로 인식하게 하는 클래스. 인수를 참조로
. class ZtCCheckRef .
-- 2021-04-10 16:15
*/
template<typename TType> class ZtCRef
{
public :
typedef TType& TypeData;
typedef TType TypeRaw ;
private:
TypeData mr_Data;
public :
ZtCRef(TypeData AR_TypeData) : mr_Data(AR_TypeData){}
public :
TypeData GetData(){return mr_Data;}
};/*
template<typename TType> class ZtCRef*/
/* template 인수에 ZtCRef 가 있으면, 해당 값을 참조로 인식하고
, .
ZtCArray.H .
-- 2021-04-10 16:15
*/
template<typename TType> class ZtCCheckRef
{
public :
typedef TType TypeData;
typedef TType TypeRaw ;
private:
TypeData mr_Data;
public :
ZtCCheckRef(TypeData AR_TypeData) : mr_Data(AR_TypeData){}
public :
TypeData GetData(){return mr_Data;}
public :
static TypeData PassData(TypeData AO_Data){return AO_Data;}
};/*
template<typename TType> class ZtCCheckRef*/
/* ZtCRef 전문화 */
template<typename TType> class ZtCCheckRef< ZtCRef<TType> >
{
public :
typedef TType& TypeData;
typedef TType TypeRaw ;
typedef ZtCRef<TType> ZCRef ;
private:
TypeData mr_Data;
public :
ZtCCheckRef(TypeData AR_TypeData) : mr_Data(AR_TypeData){}
public :
TypeData GetData(){return mr_Data;}
public :
static TypeData PassData(TypeData AO_Data){return AO_Data;}
static TypeData PassData(ZCRef& AO_Data){return AO_Data.GetData();}
static TypeData PassData(const ZCRef& AO_Data)
{return (const_cast<ZCRef>(AO_Data)).GetData();}
};/*
template<typename TType> class ZtCCheckRef< ZtCRef<TType> >*/
2021-02-25 16:23:13 +09:00
namespace ZNsType
{
/*/////////////////////////////////////////////////////////////////////////////////////////
( ) 릿 typename 10 릿
릿 typename 릿 typename
. typedef ZtCType .
2021-02-25 17:11:44 +09:00
ZtCTypeCRTP<> 릿 CRTP(CURIOUSLY RECURRING TEMPLATE PATTERN)
. ZtCTypeCRTP<> , ,
2021-02-25 16:23:13 +09:00
2 (CRTP , ) .
-- 2010-03-12 20:00:00
2021-03-25 16:05:16 +09:00
class ZtCTypeCRTP ,
class ZtCTypeCRTP2_T .
2021-03-25 16:41:48 +09:00
, ZtCTypeCRTP
. CDerive0 , ,
CDerive0::ZtCTypeCRTP::TypeData
. .
2021-03-25 16:05:16 +09:00
-- 2021-03-25 16:01
2021-02-25 17:11:44 +09:00
TypeData .
2021-02-25 16:23:13 +09:00
-- 2011-10-18 21:51:00
/////////////////////////////////////////////////////////////////////////////////////////*/
template< typename TTypeChild=ZCEmpty, bool TTypebUseCRTP =false
>
2021-02-25 17:11:44 +09:00
class ZtCTypeCRTP ////////////////////////////////////////////////
2021-02-25 16:23:13 +09:00
{
public:
typedef TTypeChild TypeData;
public:
2021-03-04 15:36:45 +09:00
enum{ZEUseCRTP=(ZTypIntE)TTypebUseCRTP};
2021-02-25 16:23:13 +09:00
public:
};/*
template< typename TTypeChild=ZCEmpty, bool TTypebUseCRTP =false
>
2021-02-25 17:11:44 +09:00
class ZtCTypeCRTP //////////////////////////////////////////////*/
2021-02-25 16:23:13 +09:00
template< typename TTypeChild =ZCEmpty
, typename TTypeBase =ZCEmpty
, bool TTypebUseCRTP=false
>
class ZtCTypeCRTP2_T /////////////////////
{
public:
typedef TTypeChild TypeData;
typedef TTypeBase TypeBase;
public:
2021-03-04 15:36:45 +09:00
enum{ZEUseCRTP=(ZTypIntE)TTypebUseCRTP};
2021-02-25 16:23:13 +09:00
public:
}; /*
template< typename TTypeChild =ZCEmpty
, typename TTypeBase =ZCEmpty
, bool TTypebUseCRTP=false
>
2021-02-25 17:11:44 +09:00
class ZtCTypeCRTP2 /////////////////////*/
2021-02-25 16:23:13 +09:00
/*//////////////////////////////////////////////////////////////////////////////////////////
2021-03-25 16:05:16 +09:00
class ZtCTypeCRTP2<> , CWorkPool.H
2021-02-25 16:23:13 +09:00
'-CCtrlAllocWork::CRTP2' .
-- 2012-09-20 09:46:00
//////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////
2021-03-25 16:50:23 +09:00
class ZtCTypeCRTP<> class ,
2021-02-25 16:23:13 +09:00
class ZtCTypeNowCRTP<>
2021-03-25 16:05:16 +09:00
. CCtrlAsyncSock.H .
TAsyncServ
, CMainServ TAsyncServ ,
, CMainServ0
2021-03-25 16:50:23 +09:00
.
2021-02-25 16:23:13 +09:00
typedef typename TAsyncServ::ZtCTypeCRTP ZtCTypeCRTP ;
typedef typename ZtCTypeCRTP ::TypeData CMainServ0;
typedef std::ZNsType::ZtCTypeNowCRTP<
TAsyncServ, CMainServ0>::TypeData CMainServ ;
CMainServ& VR_CMainServ=
static_cast<CMainServ&>(ArCAsyncServ);
ZtCTypeNowCRTP<> TAsyncServ , CMainServ0 ZCEmpty ,
.
.
. C++ . -- 2013-06-10 00:33:00
/////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
2021-03-25 16:05:16 +09:00
template<typename TTypeNow, typename TTypeChild>
class ZtCTypeNowCRTP
2021-03-04 15:36:45 +09:00
{ public: typedef TTypeChild TypeData; public: enum{ZEUseCRTP=1}; };
2021-03-25 16:05:16 +09:00
template<typename TTypeNow>
class ZtCTypeNowCRTP<TTypeNow, ZCEmpty>
2021-03-04 15:36:45 +09:00
{ public: typedef TTypeNow TypeData; public: enum{ZEUseCRTP=0}; };
2021-03-25 16:05:16 +09:00
template<typename TTypeNow>
class ZtCTypeNowCRTP<TTypeNow, void >
2021-03-04 15:36:45 +09:00
{ public: typedef TTypeNow TypeData; public: enum{ZEUseCRTP=0}; };
2021-02-25 16:23:13 +09:00
2021-03-24 10:37:45 +09:00
/* template 인수에 ZtCRef 가 있으면, 해당 값을 참조로 인식하고
2021-03-25 16:51:46 +09:00
, .
2021-03-24 10:37:45 +09:00
class ZtCCheckRef , ,
typedef .
-- 2021-04-10 16:15
*/
template<typename TType> class ZtCTypeCheckRef
{
public :
typedef TType TypeData;
typedef TType TypeRaw ;
public :
};/*
template<typename TType> class ZtCTypeCheckRef*/
template<typename TType> class ZtCTypeCheckRef< ZtCRef<TType> >
{
public :
typedef TType& TypeData;
typedef TType TypeRaw ;
typedef ZtCRef<TType> ZCRef ;
public :
};/*
template<typename TType> class ZtCTypeCheckRef< ZtCRef<TType> >*/
2021-02-25 16:23:13 +09:00
namespace ZNsTmplParam
{
/*//////////////////////////////////////////////////////////////////////////
릿 ,
,
, ,
template .
CParam~ .
ZNsTmplParam ZNsType .
.
//////////////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsTmplParam*/
/*//////////////////////////////////////////////////////////////////////////////
class ZtCTypeArguBind class ZtCArguBind .
class ZtCTypeArguBind class ZtCArguBind CArguBind_test.cpp
.
ZtCArguBind boost bind , .
-- 2014-07-05 18:49:00
//////////////////////////////////////////////////////////////////////////////*/
template< typename TTypeArgu1 , typename TTypeArgu2
, typename TTypeArgu3=ZCEmpty, typename TTypeArgu4 =ZCEmpty
, typename TTypeArgu5=ZCEmpty, typename TTypeArgu6 =ZCEmpty
, typename TTypeArgu7=ZCEmpty, typename TTypeArgu8 =ZCEmpty
, typename TTypeArgu9=ZCEmpty, typename TTypeArgu10=ZCEmpty
>
class ZtCTypeArguBind ///////////////////////////////////////////////
{
public:
2021-03-24 10:37:45 +09:00
typedef typename ZtCTypeCheckRef<TTypeArgu1 >::TypeData TypeArgu1 ;
typedef typename ZtCTypeCheckRef<TTypeArgu2 >::TypeData TypeArgu2 ;
typedef typename ZtCTypeCheckRef<TTypeArgu3 >::TypeData TypeArgu3 ;
typedef typename ZtCTypeCheckRef<TTypeArgu4 >::TypeData TypeArgu4 ;
typedef typename ZtCTypeCheckRef<TTypeArgu5 >::TypeData TypeArgu5 ;
typedef typename ZtCTypeCheckRef<TTypeArgu6 >::TypeData TypeArgu6 ;
typedef typename ZtCTypeCheckRef<TTypeArgu7 >::TypeData TypeArgu7 ;
typedef typename ZtCTypeCheckRef<TTypeArgu8 >::TypeData TypeArgu8 ;
typedef typename ZtCTypeCheckRef<TTypeArgu9 >::TypeData TypeArgu9 ;
typedef typename ZtCTypeCheckRef<TTypeArgu10>::TypeData TypeArgu10;
2021-02-25 16:23:13 +09:00
struct ZStArguments2{ ZStArguments2(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments2*/
struct ZStArguments3{ZStArguments3(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments3*/
struct ZStArguments4{ZStArguments4(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments4*/
struct ZStArguments5{ZStArguments5(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4, TypeArgu5 AR_TypeArgu5):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4), _5(AR_TypeArgu5){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4; TypeArgu5 _5;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments5*/
struct ZStArguments6{ZStArguments6(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4, TypeArgu5 AR_TypeArgu5, TypeArgu6 AR_TypeArgu6):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4), _5(AR_TypeArgu5), _6(AR_TypeArgu6){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4; TypeArgu5 _5; TypeArgu6 _6;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments6*/
struct ZStArguments7{ZStArguments7(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4, TypeArgu5 AR_TypeArgu5, TypeArgu6 AR_TypeArgu6, TypeArgu7& AR_TypeArgu7):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4), _5(AR_TypeArgu5), _6(AR_TypeArgu6), _7(AR_TypeArgu7){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4; TypeArgu5 _5; TypeArgu6 _6; TypeArgu7 _7;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments7*/
struct ZStArguments8{ZStArguments8(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4, TypeArgu5 AR_TypeArgu5, TypeArgu6 AR_TypeArgu6, TypeArgu7& AR_TypeArgu7, TypeArgu8& AR_TypeArgu8):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4), _5(AR_TypeArgu5), _6(AR_TypeArgu6), _7(AR_TypeArgu7), _8(AR_TypeArgu8){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4; TypeArgu5 _5; TypeArgu6 _6; TypeArgu7 _7; TypeArgu8 _8;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments8*/
struct ZStArguments9{ZStArguments9(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4, TypeArgu5 AR_TypeArgu5, TypeArgu6 AR_TypeArgu6, TypeArgu7& AR_TypeArgu7, TypeArgu8& AR_TypeArgu8, TypeArgu9 AR_TypeArgu9):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4), _5(AR_TypeArgu5), _6(AR_TypeArgu6), _7(AR_TypeArgu7), _8(AR_TypeArgu8), _9(AR_TypeArgu9){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4; TypeArgu5 _5; TypeArgu6 _6; TypeArgu7 _7; TypeArgu8 _8; TypeArgu9 _9;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments9*/
struct ZStArguments10{ZStArguments10(
2021-03-24 10:37:45 +09:00
TypeArgu1 AR_TypeArgu1, TypeArgu2 AR_TypeArgu2, TypeArgu3 AR_TypeArgu3, TypeArgu4 AR_TypeArgu4, TypeArgu5 AR_TypeArgu5, TypeArgu6 AR_TypeArgu6, TypeArgu7& AR_TypeArgu7, TypeArgu8& AR_TypeArgu8, TypeArgu9 AR_TypeArgu9, TypeArgu10 AR_TypeArgu10):
2021-02-25 16:23:13 +09:00
_1(AR_TypeArgu1), _2(AR_TypeArgu2), _3(AR_TypeArgu3), _4(AR_TypeArgu4), _5(AR_TypeArgu5), _6(AR_TypeArgu6), _7(AR_TypeArgu7), _8(AR_TypeArgu8), _9(AR_TypeArgu9), _10(AR_TypeArgu10){}
2021-03-24 10:37:45 +09:00
TypeArgu1 _1; TypeArgu2 _2; TypeArgu3 _3; TypeArgu4 _4; TypeArgu5 _5; TypeArgu6 _6; TypeArgu7 _7; TypeArgu8 _8; TypeArgu9 _9; TypeArgu10 _10;
2021-02-25 16:23:13 +09:00
};/*
struct ZStArguments10*/
public:
};/*
template< typename TTypeArgu1 , typename TTypeArgu2
, typename TTypeArgu3=ZCEmpty, typename TTypeArgu4 =ZCEmpty
, typename TTypeArgu5=ZCEmpty, typename TTypeArgu6 =ZCEmpty
, typename TTypeArgu7=ZCEmpty, typename TTypeArgu8 =ZCEmpty
, typename TTypeArgu9=ZCEmpty, typename TTypeArgu10=ZCEmpty
>
class ZtCTypeArguBind /////////////////////////////////////////////*/
}/*
namespace ZNsType*/
template<typename TClassExec> class ZtCArguBind
{
public:
template<typename Type1, typename Type2>
static void Exec2(Type1& AR_Type1, Type2& AR_Type2)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2>::
ZStArguments2 VO_ZtCTypeArguBind(AR_Type1, AR_Type2);
TClassExec::Exec2(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2>
static void Exec2(Type1& AR_Type1, Type2& AR_Type2)*/
template<typename Type1, typename Type2, typename THelpType>
static void Exec2(Type1& AR_Type1, Type2& AR_Type2, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2>::
ZStArguments2 VO_ZtCTypeArguBind(AR_Type1, AR_Type2);
TClassExec::Exec2(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename THelpType>
static void Exec2(Type1& AR_Type1, Type2& AR_Type2, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3>
static void Exec3(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3>::
ZStArguments3 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3);
TClassExec::Exec3(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3>
static void Exec3(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3)*/
template<typename Type1, typename Type2, typename Type3, typename THelpType>
static void Exec3(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3>::
ZStArguments3 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3);
TClassExec::Exec4(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename THelpType>
static void Exec3(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4>
static void Exec4(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4>::
ZStArguments4 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4);
TClassExec::Exec4(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4>
static void Exec4(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename THelpType>
static void Exec4(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4>::
ZStArguments4 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4);
TClassExec::Exec4(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename THelpType>
static void Exec4(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5>
static void Exec5(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5>::
ZStArguments5 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5);
TClassExec::Exec5(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5>
static void Exec5(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename THelpType>
static void Exec5(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5>::
ZStArguments5 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5);
TClassExec::Exec5(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename THelpType>
static void Exec5(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6>
static void Exec6(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6>::
ZStArguments6 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6);
TClassExec::Exec6(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6>
static void Exec6(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename THelpType>
static void Exec6(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6>::
ZStArguments6 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6);
TClassExec::Exec6(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename THelpType>
static void Exec6(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7>
static void Exec7(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7>::
ZStArguments7 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type6, AR_Type7);
TClassExec::Exec7(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7>
static void Exec7(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename THelpType>
static void Exec7(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7>::
ZStArguments7 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type7);
TClassExec::Exec7(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename THelpType>
static void Exec7(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7 THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8>
static void Exec8(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>::
ZStArguments8 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type6, AR_Type7, AR_Type8);
TClassExec::Exec8(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8>
static void Exec8(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename THelpType>
static void Exec8(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>::
ZStArguments8 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type7, AR_Type8);
TClassExec::Exec8(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename THelpType>
static void Exec8(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9>
static void Exec9(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9>::
ZStArguments9 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type6, AR_Type7, AR_Type8, AR_Type9);
TClassExec::Exec9(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9>
static void Exec9(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename THelpType>
static void Exec9(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9>::
ZStArguments9 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type7, AR_Type8, AR_Type9);
TClassExec::Exec9(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename THelpType>
static void Exec9(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9, THelpType& ArHelpType)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10>
static void Exec10(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9, Type10& AR_Type10)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10>::
ZStArguments10 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type6, AR_Type7, AR_Type8, AR_Type9, AR_Type10);
TClassExec::Exec10(VO_ZtCTypeArguBind);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10>
static void Exec10(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9, Type10& AR_Type10)*/
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10, typename THelpType>
static void Exec10(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9, Type10& AR_Type10, THelpType& ArHelpType)
{
typename ZNsType::ZtCTypeArguBind<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10>::
ZStArguments10 VO_ZtCTypeArguBind(AR_Type1, AR_Type2, AR_Type3, AR_Type4, AR_Type5, AR_Type6, AR_Type7, AR_Type8, AR_Type9, AR_Type10);
TClassExec::Exec10(VO_ZtCTypeArguBind, ArHelpType);
}/*
template<typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10, typename THelpType>
static void Exec10(Type1& AR_Type1, Type2& AR_Type2, Type3& AR_Type3, Type4& AR_Type4, Type5& AR_Type5, Type6& AR_Type6, Type7& AR_Type7, Type8& AR_Type8, Type9& AR_Type9, Type10& AR_Type10, THelpType& ArHelpType)*/
public:
};/*
template<typename TClassExec> class ZtCArguBind*/
/*//////////////////////////////////////////////////////////////////////////////////////////
ZtCArguBind<> struct ZtStTuple<> . -- 2015-02-15 20:52:00
template Type11 . Type10 .
-- 2015-02-16 21:20:00
2021-03-04 16:27:38 +09:00
, template 2 .
typedef ZtStTuple<int> CTupleInt1 .
typedef ZtStTuple<int, int> CTupleInt2 .
ZtStTuple<int> . -- 2021-03-04 16:27
2021-02-25 16:23:13 +09:00
//////////////////////////////////////////////////////////////////////////////////////////*/
2021-03-04 16:14:44 +09:00
template< typename Type1 , typename Type2 =void,
typename Type3=void, typename Type4 =void,
typename Type5=void, typename Type6 =void,
typename Type7=void, typename Type8 =void,
2021-02-25 17:11:44 +09:00
typename Type9=void, typename Type10=void, typename Type11=void
2021-02-25 16:23:13 +09:00
>
struct ZtStTuple //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
Type1 _1;
ZtStTuple(){}
ZtStTuple(Type1 _T1):_1(_T1){}
};/*
2021-03-04 16:28:39 +09:00
template< typename Type1 , typename Type2 =void,
typename Type3=void, typename Type4 =void,
typename Type5=void, typename Type6 =void,
typename Type7=void, typename Type8 =void,
2021-02-25 17:11:44 +09:00
typename Type9=void, typename Type10=void, typename Type11=void
2021-02-25 16:23:13 +09:00
>
struct ZtStTuple ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
TypeData1 _1; TypeData2 _2;
2021-03-04 16:14:44 +09:00
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2>(){}
ZtStTuple<Type1, Type2>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2) : _1(_T1), _2(_T2) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3>(){}
ZtStTuple<Type1, Type2, Type3>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3) :
_1(_T1), _2(_T2), _3(_T3){}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4 ////////////////////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData TypeData4 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3; TypeData4 _4;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3, Type4>(){}
ZtStTuple<Type1, Type2, Type3, Type4>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3, TypeData4 _T4) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4 ////////////////////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5 ////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData TypeData4 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData TypeData5 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3; TypeData4 _4; TypeData5 _5;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5>(){}
ZtStTuple<Type1, Type2, Type3, Type4, Type5>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3, TypeData4 _T4, TypeData5 _T5) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4), _5(_T5){}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5 ////////////////////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6 ////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData TypeData4 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData TypeData5 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData TypeData6 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3;
TypeData4 _4; TypeData5 _5; TypeData6 _6;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6>(){}
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3 ,
TypeData4 _T4, TypeData5 _T5, TypeData6 _T6) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4), _5(_T5), _6(_T6) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6 ////////////////////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7 ////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData TypeData4 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData TypeData5 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData TypeData6 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type7>::TypeData TypeData7 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3; TypeData4 _4;
TypeData5 _5; TypeData6 _6; TypeData7 _7;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7>(){}
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3, TypeData4 _T4,
TypeData5 _T5, TypeData6 _T6, TypeData7 _T7) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4), _5(_T5), _6(_T6), _7(_T7) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7 ////////////////////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8 ////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8> //////////////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData TypeData4 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData TypeData5 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData TypeData6 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type7>::TypeData TypeData7 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type8>::TypeData TypeData8 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3; TypeData4 _4;
TypeData5 _5; TypeData6 _6; TypeData7 _7; TypeData8 _8;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>(){}
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>(
2021-03-24 10:37:45 +09:00
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3, TypeData4 _T4,
TypeData5 _T5, TypeData6 _T6, TypeData7 _T7, TypeData8 _T8) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4) ,
_5(_T5), _6(_T6), _7(_T7), _8(_T8) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8 ////////////////////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8> ////////////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9 ////////////////////////
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9> ///////////////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData TypeData4 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData TypeData5 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData TypeData6 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type7>::TypeData TypeData7 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type8>::TypeData TypeData8 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type9>::TypeData TypeData9 ;
TypeData1 _1; TypeData2 _2; TypeData3 _3; TypeData4 _4; TypeData5 _5;
TypeData6 _6; TypeData7 _7; TypeData8 _8; TypeData9 _9;
2021-02-25 16:23:13 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9>(){}
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9>
(
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3, TypeData4 _T4,
TypeData5 _T5, TypeData6 _T6, TypeData7 _T7, TypeData8 _T8, TypeData9 _T9
) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4), _5(_T5),
_6(_T6), _7(_T7), _8(_T8), _9(_T9) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9> /////////////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10> ///////////////////////////////////////////////////////////////////////////////////////////
{
2021-03-24 10:37:45 +09:00
typedef typename ZNsType::ZtCTypeCheckRef<Type1 >::TypeData TypeData1 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type2 >::TypeData TypeData2 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type3 >::TypeData TypeData3 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type4 >::TypeData TypeData4 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type5 >::TypeData TypeData5 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type6 >::TypeData TypeData6 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type7 >::TypeData TypeData7 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type8 >::TypeData TypeData8 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type9 >::TypeData TypeData9 ;
typedef typename ZNsType::ZtCTypeCheckRef<Type10>::TypeData TypeData10;
TypeData1 _1; TypeData2 _2; TypeData3 _3; TypeData4 _4; TypeData5 _5 ;
TypeData6 _6; TypeData7 _7; TypeData8 _8; TypeData9 _9; TypeData9 _10;
2021-02-25 16:23:13 +09:00
2021-03-24 10:37:45 +09:00
ZtStTuple<
Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10>(){}
2021-02-25 16:23:13 +09:00
2021-03-24 10:37:45 +09:00
ZtStTuple<
Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10>(
TypeData1 _T1, TypeData2 _T2, TypeData3 _T3, TypeData4 _T4, TypeData5 _T5 ,
TypeData6 _T6, TypeData7 _T7, TypeData8 _T8, TypeData9 _T9, TypeData10 _T10) :
_1(_T1), _2(_T2), _3(_T3), _4(_T4), _5 (_T5 ),
_6(_T6), _7(_T7), _8(_T8), _9(_T9), _10(_T10) {}
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10
>
struct ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10> /////////////////////////////////////////////////////////////////////////////////////////*/
template< typename Type1, typename Type2
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2>(AO_Type1, AO_Type2);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2> ZftMakeArguTuple(Type1 AO_Type1, Type2 AO_Type2) */
2021-02-25 16:23:13 +09:00
template< typename Type1, typename Type2, typename Type3
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3>(AO_Type1, AO_Type2, AO_Type3);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3> ZftMakeArguTuple(Type1 AO_Type1, Type2 AO_Type2, Type2 AO_Type3) */
2021-02-25 16:23:13 +09:00
template< typename Type1, typename Type2, typename Type3, typename Type4
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData AO_Type4
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4> ZftMakeArguTuple(Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4) */
2021-02-25 16:23:13 +09:00
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData AO_Type4,
typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData AO_Type5
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4, Type5>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4, AO_Type5);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5> ZftMakeArguTuple(Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4, Type5 AO_Type5) */
2021-02-25 16:23:13 +09:00
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData AO_Type4,
typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData AO_Type5,
typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData AO_Type6
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4, AO_Type5, AO_Type6);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6> ZftMakeArguTuple(Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4, Type5 AO_Type5, Type6AO_Type6) */
2021-02-25 16:23:13 +09:00
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData AO_Type4,
typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData AO_Type5,
typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData AO_Type6,
typename ZNsType::ZtCTypeCheckRef<Type7>::TypeData AO_Type7
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4, AO_Type5, AO_Type6, AO_Type7);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, typename Type7> ZftMakeArguTuple(Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4, Type5 AO_Type5, Type6 AO_Type6, Type7 AO_Type7) */
2021-02-25 16:23:13 +09:00
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData AO_Type4,
typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData AO_Type5,
typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData AO_Type6,
typename ZNsType::ZtCTypeCheckRef<Type7>::TypeData AO_Type7,
typename ZNsType::ZtCTypeCheckRef<Type8>::TypeData AO_Type8
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4, AO_Type5, AO_Type6, AO_Type7, AO_Type8);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8> ZftMakeArguTuple(
2021-02-25 16:23:13 +09:00
Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4, Type5 AO_Type5, Type6 AO_Type6, Type7 AO_Type7, Type8 AO_Type8) */
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1>::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2>::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3>::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4>::TypeData AO_Type4,
typename ZNsType::ZtCTypeCheckRef<Type5>::TypeData AO_Type5,
typename ZNsType::ZtCTypeCheckRef<Type6>::TypeData AO_Type6,
typename ZNsType::ZtCTypeCheckRef<Type7>::TypeData AO_Type7,
typename ZNsType::ZtCTypeCheckRef<Type8>::TypeData AO_Type8,
typename ZNsType::ZtCTypeCheckRef<Type9>::TypeData AO_Type9
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4, AO_Type5, AO_Type6, AO_Type7, AO_Type8, AO_Type9);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9> ZftMakeArguTuple(
2021-02-25 16:23:13 +09:00
Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4, Type5 AO_Type5, Type6 AO_Type6, Type7 AO_Type7, Type8 AO_Type8, Type8 AO_Type9) */
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10> ZftMakeArguTuple
(
typename ZNsType::ZtCTypeCheckRef<Type1 >::TypeData AO_Type1,
typename ZNsType::ZtCTypeCheckRef<Type2 >::TypeData AO_Type2,
typename ZNsType::ZtCTypeCheckRef<Type3 >::TypeData AO_Type3,
typename ZNsType::ZtCTypeCheckRef<Type4 >::TypeData AO_Type4,
typename ZNsType::ZtCTypeCheckRef<Type5 >::TypeData AO_Type5,
typename ZNsType::ZtCTypeCheckRef<Type6 >::TypeData AO_Type6,
typename ZNsType::ZtCTypeCheckRef<Type7 >::TypeData AO_Type7,
typename ZNsType::ZtCTypeCheckRef<Type8 >::TypeData AO_Type8,
typename ZNsType::ZtCTypeCheckRef<Type9 >::TypeData AO_Type9,
typename ZNsType::ZtCTypeCheckRef<Type10>::TypeData AO_Type10
)
2021-02-25 16:23:13 +09:00
{
2021-03-24 10:37:45 +09:00
return ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10>
(AO_Type1, AO_Type2, AO_Type3, AO_Type4, AO_Type5, AO_Type6, AO_Type7, AO_Type8, AO_Type9, AO_Type10);
2021-02-25 16:23:13 +09:00
};/*
template< typename Type1, typename Type2, typename Type3, typename Type4, typename Type5, typename Type6, typename Type7, typename Type8, typename Type9, typename Type10
>
2021-03-24 10:37:45 +09:00
ZtStTuple<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10> ZftMakeArguTuple(
2021-02-25 16:23:13 +09:00
Type1 AO_Type1, Type2 AO_Type2, Type3 AO_Type3, Type4 AO_Type4, Type5 AO_Type5, Type6 AO_Type6, Type7 AO_Type7, Type8 AO_Type8, Type9 AO_Type9, Type1 AO_Type10) */
namespace ZNsHide
{
/* 특정 클래스 안에서만 사용되어, 사용자가 그 존재를 알 필요가 없는 클래스를 둔다. */
}/*
namespace ZNsHide*/
namespace ZNsIn
{
/*///////////////////////////////////////////////////////////////////////////////
, ,
ZNsIn~ namespace .
ZNsHide Hidden ,
. CIocp , CHelpIocp
, CHelpIocp
namespace ZNsInIOCP .
-- 2009-12-21 12:56:00
///////////////////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsIn*/
namespace ZNsTmplParam
{
}/*
namespace ZNsTmplParam*/
namespace ZNsBase
{
// 가상클래스도 아니고 인터페이스 전용의 함수도 아니면서
// 주로 기반 클래스로 사용되는 클래스는 여기에 둔다.
}/*
namespace ZNsBase*/
namespace ZNsSngt
{
/*////////////////////////////////////////////////////////////////////////////////////////////
singleton object object .
singleton object , CSngt .
////////////////////////////////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsSngt*/
namespace ZNsSttc
{
/*/////////////////////////////////////////////////////////////////////////////
static object CSttc .
-- 2010-03-10 19:58:00
/////////////////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsSttc*/
namespace ZNsReent
{
/*////////////////////////////////////////////////////////////
ZNsReent : namespace Reentrant
thread safe ,
thread safe .
////////////////////////////////////////////////////////////*/
}/*
namespace ZNsReent*/
namespace ZNsArg
{
/*////////////////////////////////////////////////////////////////
Call Back
, object
, object class
object ,
.
Call Back
.
-- 2010-01-02 22:11:00
////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsArg*/
namespace ZNsDeco
{
/*////////////////////////////////////////////////////////////////
(릿) , Decoration
, ,
Decoration namespace ZNsDeco
. , Logic View , View
( ) 릿 .
-- 2010-03-10 22:04:00
////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsDeco*/
namespace ZNsView
{
/*//////////////////////////////////////////////////////////////////////////////////
'Logic-View '( Document-View ,
'Logic-View ' ) View
. CView .
CView , namespace ZNsView View
, CView ,
.
-- 2011-09-11 13:50:00
//////////////////////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsView*/
namespace ZNsViewIFace
{
/*//////////////////////////////////////////////////////////////////////////////////
'Logic-View ' View interface
.
-- 2011-09-11 13:54:00
//////////////////////////////////////////////////////////////////////////////////*/
}/*
namespace ZNsViewIFace*/
namespace ZNsCRTP
{
/*//////////////////////////////////////////////////
CRTP : CURIOUSLY RECURRING TEMPLATE PATTERN
CRTP 릿 .
-- 2010-03-12 13:51:00
//////////////////////////////////////////////////*/
}/*
namespace ZNsCRTP*/
namespace ZNsFunc
{
/*///////////////////////////////////////////////////////////////////////////
릿 .
__FastMoveObj<>(Type1& AR_Type1,Type2& AR_Type2)
RValue Reference . Move
Move ,
AR_Type2 0 .
object Move object
__FastMoveObj() 릿 .
func() object /
, object class , /
/ , , func()
object __Init<>(), __Fini<>()
. , __Init, __Fini 릿
.
-- 2009-08-15 19:57:00
///////////////////////////////////////////////////////////////////////////*/
template<typename Type1, typename Type2>
void __FastMoveObj(Type1& AR_Type1, Type2& AR_Type2)
{
#ifdef _DEBUG_FAST_MOVE_OBJ_
cout<<" ※※ __FastMoveObj Start : Type1="<<typeid(Type1).name()<<", Type2="<<typeid(Type2).name()<<endl;
#endif //_DEBUG_FAST_MOVE_OBJ_
AR_Type1=AR_Type2;
#ifdef _DEBUG_FAST_MOVE_OBJ_
cout<<" ※※ __FastMoveObj Close : Type2="<<typeid(Type1).name()<<", Type2="<<typeid(Type2).name()<<endl;
#endif //_DEBUG_FAST_MOVE_OBJ_
}/*
template<typename Type1, typename Type2>
void __FastMoveObj(Type& AR_Type1, Type& AR_Type2) */
template<typename Type> void __Init(Type& AR_Type)
{
#ifdef _DEBUG
cout<<"void ZNsFunc::__Init<Type>(Type&), Type="<<typeid(Type).name()<<endl;
#endif //_DEBUG
}/*
template<typename Type> void __Init(Type& AR_Type)*/
template<typename Type> void __Fini(Type& AR_Type)
{
#ifdef _DEBUG
cout<<"void ZNsFunc::__Fini<Type>(Type&), Type="<<typeid(Type).name()<<endl;
#endif //_DEBUG
}/*
template<typename Type> void __Fini(Type& AR_Type)*/
/*///////////////////////////////////////////////////////////////////////////
CObjAVL<> object ,
1 2 ,
bool operator> (~)
bool operator==(~)
1 ( )
int ZtCCompare<>::Exec(TTypeArg1 AR_TypeArg1, TTypeArg2 AR_TypeArg2)
.
-- 2012-09-01 20:13:00
2021-03-04 15:36:45 +09:00
AR_Type1==AR_Type2 ZNsEnum::ZECompareResult_Equal ,
AR_Type1>=AR_Type2 ZNsEnum::ZECompareResult_Equal ,
AR_Type1> AR_Type2 ZNsEnum::ZECompareResult_More ,
AR_Type1<=AR_Type2 ZNsEnum::ZECompareResult_Equal ,
AR_Type1< AR_Type2 ZNsEnum::ZECompareResult_Less ,
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
AR_Type1>=AR_Type2 ZNsEnum::ZECompareResult_Equal ,
AR_Type1> AR_Type2 ZNsEnum::ZECompareResult_Equal ,
AR_Type1<=AR_Type2 ZNsEnum::ZECompareResult_Equal ,
AR_Type1< AR_Type2 ZNsEnum::ZECompareResult_Equal ,
2021-02-25 16:23:13 +09:00
.
-- 2012-09-01 20:20:00
template<typename Type1,typename Type2> __CompareObj(Type1, Type2)
, 릿 .
, ...
.
-- 2012-09-02 22:49:00
ZtCCompare<>::Exec(~) template , template
. template ZtCCompare<> template
TTypeArg1, TTypeArg2 .
.
-- 2012-10-09 09:14:00
///////////////////////////////////////////////////////////////////////////*/
template< typename TTypeArg1,
typename TTypeArg2,
bool TTypebCompareObj=true
>
class ZtCCompare /////////////////////////
{
public:
2021-03-04 15:36:45 +09:00
enum {ZEUseCompareObj=(ZTypIntE)TTypebCompareObj};
2021-02-25 16:23:13 +09:00
public:
template<typename TTypeArg11, typename TTypeArg22>
static ZTypInt Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2)
{
#ifdef _DEBUG_CCOMPARE_EXEC
cout<<" ※※ ZtCCompare<TTypeArg1, TTypeArg2, true> is called."<<endl;
#endif //_DEBUG_CCOMPARE_EXEC
return AR_TypeArg1.Compare(AR_TypeArg2);
}/*
template<typename TTypeArg11, typename TTypeArg22>
static ZTypInt Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2) */
public:
};/*
template< typename TTypeArg1,
typename TTypeArg2,
bool TTypebCompareObj=true
>
class ZtCCompare ///////////////////////*/
template<typename TTypeArg1, typename TTypeArg2
>
class ZtCCompare<TTypeArg1, TTypeArg2, false>
{
public:
2021-03-04 15:36:45 +09:00
enum {ZEUseCompareObj=0};
2021-02-25 16:23:13 +09:00
public:
template<typename TTypeArg11, typename TTypeArg22>
static ZTypInt Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2)
{
2021-03-04 15:36:45 +09:00
return ZNsEnum::ZECompareResult_Equal;
2021-02-25 16:23:13 +09:00
}/*
template<typename TTypeArg11, typename TTypeArg22>
static ZTypInt Exec(TTypeArg1 AR_TypeArg1, TTypeArg2 AR_TypeArg2)*/
public:
};/*
template<typename TTypeArg1, typename TTypeArg2
>
class ZtCCompare<TTypeArg1, TTypeArg2, false> */
template<> class ZtCCompare<ZTypInt, ZTypInt, true>
{
public:
2021-03-04 15:36:45 +09:00
enum {ZEUseCompareObj=1};
2021-02-25 16:23:13 +09:00
public:
static ZTypInt Exec(ZTypInt AI_Int1, ZTypInt AI_Int2)
{
#ifdef _DEBUG_CCOMPARE_EXEC
cout<<" ※※ ZtCCompare<int, int, true> is called."<<endl;
#endif //_DEBUG_CCOMPARE_EXEC
return AI_Int1 - AI_Int2 ;
}/*
static ZTypInt Exec(ZTypInt AI_Int1, ZTypInt AI_Int2)*/
public:
};/*
template<> class ZtCCompare<ZTypInt, ZTypInt, true>*/
/*/////////////////////////////////////////////
ZtCMoveObj<> CObjAVL.H .
-- 2013-08-26 19:18:00
/////////////////////////////////////////////*/
template< typename TTypeArg1,
typename TTypeArg2,
bool TTypebMoveObj=true
>
class ZtCMoveObj ///////////////////////
{
public:
2021-03-04 15:36:45 +09:00
enum {ZEUseMoveObj=(ZTypIntE)TTypebMoveObj};
2021-02-25 16:23:13 +09:00
public:
template<typename TTypeArg11, typename TTypeArg22>
static void Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2)
{
#ifdef _DEBUG_MOVEOBJ_EXEC
cout<<" ※※ ZtCMoveObj<TTypeArg1, TTypeArg2, true> is called."<<endl;
#endif //_DEBUG_MOVEOBJ_EXEC
return AR_TypeArg1.Compare(AR_TypeArg2);
}/*
template<typename TTypeArg11, typename TTypeArg22>
static void Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2) */
public:
};/*
template< typename TTypeArg1,
typename TTypeArg2,
bool TTypebMoveObj=true
>
class ZtCMoveObj ////////////////////*/
template< typename TTypeArg1, typename TTypeArg2
>
class ZtCMoveObj<TTypeArg1, TTypeArg2, false> ////
{
public:
2021-03-04 15:36:45 +09:00
enum {ZEUseMoveObj=0};
2021-02-25 16:23:13 +09:00
public:
template<typename TTypeArg11, typename TTypeArg22>
static void Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2)
{
AR_TypeArg1 = AR_TypeArg2 ;
}/*
template<typename TTypeArg11, typename TTypeArg22>
static void Exec(TTypeArg11 AR_TypeArg1, TTypeArg22 AR_TypeArg2) */
public:
};/*
template< typename TTypeArg1, typename TTypeArg2
>
class ZtCMoveObj<TTypeArg1, TTypeArg2, false> //*/
}/*
namespace ZNsFunc*/
namespace ZNsTmplChain
{
/*////////////////////////////////////////////////////////////
ZtCTmplChain<> , chain
.
-- 2011-08-05 21:16:00
CMainChars.H
TTypeLength CSearchCursor_T<>::GetLengthByTmplChain(~)
.
-- 2011-08-06 23:51:00
////////////////////////////////////////////////////////////*/
template< typename TTypeNow, typename TTypeNext
>
class ZtCTmplChain ////////////////////////////
{
public :
typedef TTypeNow ZCObjNow ;
typedef TTypeNext ZCObjNext;
public :
2021-03-04 15:36:45 +09:00
enum{ZENextObjNo =ZCObjNext::ENextObjNo+1};
enum{ZEBoolNextObj=1 };
2021-02-25 16:23:13 +09:00
private:
TTypeNow mo_ZCObjNow ;
TTypeNext mo_ZCObjNext;
public :
ZCObjNow& GetNowObj () {return mo_ZCObjNow ;}
ZCObjNext& GetNextObj() {return mo_ZCObjNext;}
/*#####################################################*/
const ZCObjNow& GetNowObj () const{return mo_ZCObjNow ;}
const ZCObjNext& GetNextObj() const{return mo_ZCObjNext;}
public:
};/*
template< typename TTypeNow, typename TTypeNext
>
class ZtCTmplChain //////////////////////////*/
template<typename TTypeNow> class ZtCTmplChain<TTypeNow, ZCEmpty>
{
public :
typedef TTypeNow ZCObjNow ;
typedef TTypeNow ZCObjNext;
public :
2021-03-04 15:36:45 +09:00
enum{ZENextObjNo =1};
enum{ZEBoolNextObj=0};
2021-02-25 16:23:13 +09:00
private:
ZCObjNow mo_ZCObjNow;
public :
ZCObjNow& GetNowObj () {return mo_ZCObjNow;}
ZCObjNext& GetNextObj() {return mo_ZCObjNow;}
/*####################################################*/
const ZCObjNow& GetNowObj () const{return mo_ZCObjNow;}
const ZCObjNext& GetNextObj() const{return mo_ZCObjNow;}
public:
};/*
template<typename TTypeNow> class ZtCTmplChain<TTypeNow, ZCEmpty> */
/*//////////////////////////////////////////////////////////////////////////////
ZtCTmplTreeChain<> , chain tree
, ZtCTmplChain<> namespace .
-- 2011-10-04 00:46:00
2 , GetNextObj2()
, GetNextObj()
. GetNextObj2()
.
-- 2011-10-04 21:01:00
CMainChars.H
TTypeLength CSearchCursor_T<>::GetLengthByTmplTreeChain(~)
.
-- 2011-10-04 00:53:00
//////////////////////////////////////////////////////////////////////////////*/
template< typename TTypeNow ,
typename TTypeNext ,
typename TTypeNext2
>
2021-03-04 15:36:45 +09:00
class ZtCTmplTreeChain /////////
2021-02-25 16:23:13 +09:00
{
public :
2021-03-04 15:36:45 +09:00
enum{ZENextObjNo =TTypeNext ::ENextObjNo +1};
enum{ZENextObjNo2 =TTypeNext2::ENextObjNo2+1};
enum{ZEBoolNextObj =1};
enum{ZEBoolNextObj2=1};
enum{ZEObjChainCnt =TTypeNext::EObjChainCnt+TTypeNext2::EObjChainCnt+2};
2021-02-25 16:23:13 +09:00
public :
typedef TTypeNow ZCObjNow ;
typedef TTypeNext ZCObjNext ;
typedef TTypeNext2 ZCObjNext2;
private:
ZCObjNow mo_ZCObjNow ;
ZCObjNext mo_ZCObjNext ;
ZCObjNext2 mo_ZCObjNext2;
public :
ZCObjNow& GetNowObj () {return mo_ZCObjNow ;}
ZCObjNext& GetNextObj () {return mo_ZCObjNext ;}
ZCObjNext2& GetNextObj2() {return mo_ZCObjNext2;}
/*########################################################*/
const ZCObjNow& GetNowObj () const{return mo_ZCObjNow ;}
const ZCObjNext& GetNextObj () const{return mo_ZCObjNext ;}
const ZCObjNext2& GetNextObj2() const{return mo_ZCObjNext2;}
public :
};/*
template< typename TTypeNow ,
typename TTypeNext ,
typename TTypeNext2
>
2021-03-04 15:36:45 +09:00
class ZtCTmplTreeChain ///////*/
2021-02-25 16:23:13 +09:00
template< typename TTypeNow, typename TTypeNext
>
class ZtCTmplTreeChain<TTypeNow, TTypeNext, ZCEmpty>
{
public :
2021-03-04 15:36:45 +09:00
enum{ZENextObjNo =TTypeNext::ENextObjNo +1};
enum{ZENextObjNo2 =0 };
enum{ZEBoolNextObj =1 };
enum{ZEBoolNextObj2=0 };
enum{ZEObjChainCnt =TTypeNext::EObjChainCnt+1};
2021-02-25 16:23:13 +09:00
public :
typedef TTypeNow ZCObjNow ;
typedef TTypeNext ZCObjNext ;
typedef TTypeNext ZCObjNext2; // interface 호환을 위해서만 존재.
private:
ZCObjNow mo_ZCObjNow ;
ZCObjNext mo_ZCObjNext;
public :
ZCObjNow& GetNowObj () {return mo_ZCObjNow ;}
ZCObjNext& GetNextObj () {return mo_ZCObjNext;}
ZCObjNext2& GetNextObj2() {return mo_ZCObjNext;} // interface 호환을 위해서만 존재.
/*#######################################################*/
const ZCObjNow& GetNowObj () const{return mo_ZCObjNow ;}
const ZCObjNext& GetNextObj () const{return mo_ZCObjNext;}
const ZCObjNext2& GetNextObj2() const{return mo_ZCObjNext;} // interface 호환을 위해서만 존재.
public :
};/*
template< typename TTypeNow, typename TTypeNext
>
class ZtCTmplTreeChain<TTypeNow, TTypeNext, ZCEmpty> */
template< typename TTypeNow, typename TTypeNext2
>
class ZtCTmplTreeChain<TTypeNow, ZCEmpty, TTypeNext2>
{
public :
2021-03-04 15:36:45 +09:00
enum{ZENextObjNo =0 };
enum{ZENextObjNo2 =TTypeNext2::ENextObjNo2 +1 };
enum{ZEBoolNextObj =0 };
enum{ZEBoolNextObj2=1 };
enum{ZEObjChainCnt =TTypeNext2::EObjChainCnt+1 };
2021-02-25 16:23:13 +09:00
public :
typedef TTypeNow ZCObjNow ;
typedef TTypeNext2 ZCObjNext ; // interface 호환을 위해서만 존재.
typedef TTypeNext2 ZCObjNext2;
private:
ZCObjNow mo_ZCObjNow ;
ZCObjNext2 mo_ZCObjNext2;
public :
ZCObjNow& GetNowObj () {return mo_ZCObjNow ;}
ZCObjNext& GetNextObj () {return mo_ZCObjNext2;} // interface 호환을 위해서만 존재.
ZCObjNext2& GetNextObj2() {return mo_ZCObjNext2;}
/*########################################################*/
const ZCObjNow& GetNowObj () const{return mo_ZCObjNow ;}
const ZCObjNext& GetNextObj () const{return mo_ZCObjNext2;} // interface 호환을 위해서만 존재.
const ZCObjNext2& GetNextObj2() const{return mo_ZCObjNext2;}
public :
};/*
template< typename TTypeNow , typename TTypeNext2
>
class ZtCTmplTreeChain<TTypeNow, ZCEmpty, TTypeNext2> */
template< typename TTypeNow ////////////////////
>
class ZtCTmplTreeChain<TTypeNow, ZCEmpty, ZCEmpty>
{
public :
2021-03-04 15:36:45 +09:00
enum{ZENextObjNo =0};
enum{ZENextObjNo2 =0};
enum{ZEBoolNextObj =0};
enum{ZEBoolNextObj2=0};
enum{ZEObjChainCnt =1};
2021-02-25 16:23:13 +09:00
public :
typedef TTypeNow ZCObjNow ;
typedef ZCObjNow ZCObjNext ; // interface 호환을 위해서만 존재.
typedef ZCObjNow ZCObjNext2; // interface 호환을 위해서만 존재.
private:
ZCObjNow mo_ZCObjNow;
public :
ZCObjNow& GetNowObj () {return mo_ZCObjNow;}
ZCObjNext& GetNextObj () {return mo_ZCObjNow;} // interface 호환을 위해서만 존재.
ZCObjNext2& GetNextObj2() {return mo_ZCObjNow;} // interface 호환을 위해서만 존재.
/*######################################################*/
const ZCObjNow& GetNowObj () const{return mo_ZCObjNow;} // interface 호환을 위해서만 존재.
const ZCObjNext& GetNextObj () const{return mo_ZCObjNow;} // interface 호환을 위해서만 존재.
const ZCObjNext2& GetNextObj2() const{return mo_ZCObjNow;} // interface 호환을 위해서만 존재.
public :
};/*
template< typename TTypeNow ////////////////////
>
class ZtCTmplTreeChain<TTypeNow, ZCEmpty, ZCEmpty>
*/
}/*
namespace ZNsTmplChain*/
/*///////////////////////////////////////////////////////////////////
,
2021-03-04 15:36:45 +09:00
bool enum ZERun .
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
enum ZERun ,
enum ZERunEx .
2021-02-25 16:23:13 +09:00
-- 2011-09-27 05:37:00
///////////////////////////////////////////////////////////////////*/
namespace ZNsEnum
{
2021-03-04 15:36:45 +09:00
enum ZERun
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
ZERun_NO, // 실행 중지
ZERun_OK // 실행 계속
2021-02-25 16:23:13 +09:00
};/*
2021-03-04 15:36:45 +09:00
enum ZERun*/
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
enum ZERunEx
2021-02-25 16:23:13 +09:00
{
ERunEx_NO, // 실행 중지
ERunEx_OK, // 실행 계속
ERunEx_Err // 실행 에러
};/*
2021-03-04 15:36:45 +09:00
enum ZERun*/
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
enum ZEAct
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
ZEAct_NO, // (함수 등이) 어떤 조건에 맞지 않아서 아무 짓도 하지 않았다.
ZEAct_OK // (함수 등이) 어떤 조건에 맞아서 지정된 처리를 하였다.
2021-02-25 16:23:13 +09:00
};/*
2021-03-04 15:36:45 +09:00
enum ZEAct*/
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
enum ZEActEx
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
ZEActEx_NO, // (함수 등이) 어떤 조건에 맞지 않아서 아무 짓도 하지 않았다.
ZEActEx_OK, // (함수 등이) 어떤 조건에 맞아서 지정된 처리를 하였다.
ZEActEx_Err // (함수 등이) 수행 중에 에러가 발생하였다.
2021-02-25 16:23:13 +09:00
};/*
2021-03-04 15:36:45 +09:00
enum ZEAct*/
2021-02-25 16:23:13 +09:00
2021-03-04 15:36:45 +09:00
enum ZEThrowFinally
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
ZEThrowFinally_NO,
ZEThrowFinally_OK
2021-02-25 16:23:13 +09:00
};/*
2021-03-04 15:36:45 +09:00
enum ZEThrowFinally*/
2021-02-25 16:23:13 +09:00
/*////////////////////////////////////////////////
throw ~ catch ~ finally
EThrowFinally .
////////////////////////////////////////////////*/
}/*
namespace ZNsEnum*/
namespace ZNsInterface
{
/*////////////////////////////////////////////////////////////////////////////////////
class ZIDelgtMSG C# delegate .
object object ,
object , object ZIDelgtMSG
, ZIDelgtMSG::SendMSG() ZIDelgtMSG::RecvMSG() .
COM . COM .
-- 2009-03-08 02:26:00
class ZIDelgtMSG
namespace ZNsInterface namespace ZNsIDelgt .
-- 2009-03-08 19:17:00
A, B, C .
ZIDelgtMSG , .
. ZIDelgtMSG , interface
.
-- 2010-03-13 22:28:00
////////////////////////////////////////////////////////////////////////////////////*/
class ZIDelgtMSG
{
public:
2021-03-04 15:36:45 +09:00
enum ZEIMsg{ZEIMsg_NO=0, ZEIMsg_OK=1};
2021-02-25 16:23:13 +09:00
public:
virtual ~ZIDelgtMSG(){}
2021-02-25 17:34:50 +09:00
virtual ZTypLLong GetTypeID() const
2021-02-25 16:23:13 +09:00
{
return 0;
}/*
2021-02-25 17:34:50 +09:00
virtual ZTypLLong GetTypeID() const*/
2021-02-25 16:23:13 +09:00
virtual const char* GetTypeName() const
{
return 0;
}/*
virtual const char* GetTypeID() const*/
2021-02-25 17:34:50 +09:00
virtual ZTypLLong GetIMSGPtrOfID(ZTypLLong AI_TypeID, ZIDelgtMSG*& APR_ZIDelgtMSG)
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
APR_ZIDelgtMSG=0; return ZEIMsg_OK;
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:34:50 +09:00
virtual ZTypLLong GetIMSGPtrOfID(ZTypLLong AI_TypeID, ZIDelgtMSG*R APR_ZIDelgtMSG)*/
2021-02-25 16:23:13 +09:00
2021-02-25 17:27:36 +09:00
virtual ZTypIntPtr SendMSG(ZIDelgtMSG& ArZIDelgtMSG, ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypIntI AI_MsgLen, void* AP_Void=0, ...)
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
return ZEIMsg_OK;
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:34:50 +09:00
virtual ZTypIntPtr SendMSG(ZIDelgtMSG& ArZIDelgtMSG, ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypIntI AI_MsgLen,void* AP_Void=0, ...)*/
2021-02-25 16:23:13 +09:00
2021-02-25 17:34:50 +09:00
virtual ZTypIntPtr RecvMSG(ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypLength AI_MsgLen, void* AP_Void=0, ...)
2021-02-25 16:23:13 +09:00
{
2021-03-04 15:36:45 +09:00
return ZEIMsg_OK;
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:34:50 +09:00
virtual ZTypIntPtr RecvMSG(ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypLength AI_MsgLen, void* AP_Void=0, ...)*/
2021-02-25 16:23:13 +09:00
public:
};/*
class ZIDelgtMSG*/
}/*
namespace ZNsInterface*/
namespace ZNsIDelgt
{
// class ZIDelgtMSG 를 상속하여 추가 멤버함수를 가진
// 인터페이스를 구현하는 클래스일 경우에는 여기에 둔다.
}/*
namespace ZNsIDelgt*/
class ZCAllocator
{
public:
static void* operator new (size_t AL_AllocSize ){return ::malloc(AL_AllocSize);}
static void* operator new[](size_t AL_AllocSize ){return ::malloc(AL_AllocSize);}
static void* operator new (size_t AL_AllocSize, void* AP_AllocBegin){return AP_AllocBegin ;}
static void* operator new[](size_t AL_AllocSize, void* AP_AllocBegin){return AP_AllocBegin ;}
static void operator delete (void* AP_Void){if(AP_Void!=0) ::free(AP_Void);}
static void operator delete[](void* AP_Void){if(AP_Void!=0) ::free(AP_Void);}
public:
};/*
class ZCAllocator*/
/*/////////////////////////////////////////////////////////////////
class ZCAllocator
class ZtCAllocClass<> .
ZtCAllocClass<>
ZtCAllocClass<> 릿
Type .
/////////////////////////////////////////////////////////////////*/
template<typename TType>
class ZtCAllocClass : public ZCAllocator
{
public:
TType* NewMem (size_t AL_AllocSize){return (TType*)::malloc(AL_AllocSize) ;}
TType* NewArrMem(size_t AL_AllocSize){return (TType*)::malloc(AL_AllocSize*sizeof(TType));}
public:
void DeleteMem(void* AP_Void){if(AP_Void!=0) ::free(AP_Void);}
public:
};/*
template<typename TType> class ZtCAllocClass*/
class ZCAllocClass : public ZCAllocator
{
public:
void* NewMem (size_t AL_AllocSize){return ::malloc(AL_AllocSize) ;}
void DeleteMem(void* AP_Void ){if(AP_Void!=0) ::free(AP_Void);}
public:
};/*
class ZCAllocClass : public ZCAllocator*/
/*//////////////////////////////////////////////////////////////
릿 릿 parameter
,
. ZtCTypeData<> .
cf)
2021-02-25 17:27:36 +09:00
cout<<typeid(std::ZtCTypeData<ZTypIntI >::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<ZTypIntI*>::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<ZTypIntI&>::TypeData).name()<<endl;
2021-02-25 16:23:13 +09:00
-- 2010-01-15 00:11:00
ZtCTypeData<>::GetObjRef(~)
(null ) .
릿 Parameter ,
, ,
-> (.)
.
typedef std::CStringBase_T<char> CStringData ;
typedef CStringData* CStringDataPtr;
CStringData VO_CStringData("My");
CStringDataPtr VP_CStringData=&VO_CStringData;
(*VP_CStringData)("Data");
cout<<ZtCTypeData<CStringDataPtr>::GetObjRef(VP_CStringData)<<endl;
--
//////////////////////////////////////////////////////////////*/
template<typename TType> class ZtCTypeData
{ public: typedef TType TypeData;
2021-03-08 22:09:33 +09:00
static TType& GetObjRef(TType& AR_Type){return AR_Type ;}};
2021-02-25 16:23:13 +09:00
template<typename TType> class ZtCTypeData<TType*>
{ public: typedef TType TypeData;
static TType& GetObjRef(TType* AP_Type){return *AP_Type;}};
template<typename TType> class ZtCTypeData<TType&>
{ public: typedef TType TypeData;
2021-03-08 22:09:33 +09:00
static TType& GetObjRef(TType& AR_Type){return AR_Type ;}};
2021-03-09 16:33:27 +09:00
template< > class ZtCTypeData<void* >
2021-03-08 21:55:48 +09:00
{ public: typedef void* TypeData;
2021-03-08 22:09:33 +09:00
static void* GetObjRef(void* AP_Void){return AP_Void ;}};
2021-02-25 16:23:13 +09:00
/*////////////////////////////////////////////////////////////////////////////////
,
,
.
////////////////////////////////////////////////////////////////////////////////*/
template<typename TTypeCh> class ZtCAllocMemSize
{
public:
template<typename TTypeSize>
TTypeSize GetNewAllocSize(TTypeSize AL_NowAllocSize, TTypeSize AL_AllAllocSize)
{
/* AL_AllAllocSize : 해당 문자열 object 가 할당받은 문자 총갯수.
AL_NowAllocSize : AL_AllAllocSize . */
return AL_NowAllocSize<=AL_AllAllocSize ? AL_NowAllocSize : AL_NowAllocSize*2 ;
}/*
template<typenanme TTypeSize>
TTypeSize GetNewAllocSize(TTypeSize AL_NowAllocSize, TTypeSize AL_AllAllocSize) */
public:
};/*
template<typename TTypeCh> class ZtCAllocMemSize */
/*//////////////////////////////////////////////////////////////
릿 n ,
,
.
//////////////////////////////////////////////////////////////*/
template<typename TTypSize> class ZtCShortCut
{
private:
static inline TTypSize GetAbs(TTypSize AI_Param) // 인수의 절대값을 얻는다.
{
return (AI_Param<0 ? -AI_Param : AI_Param);
}/*
static inline TTypSize GetAbs(TTypSize AI_Param)*/
/*private:*/
public :
2021-02-25 17:27:36 +09:00
static ZTypIntI GetAbsMinOrder(TTypSize AI_One, TTypSize AI_Two, TTypSize AI_Three)
2021-02-25 16:23:13 +09:00
{
// 세 개의 인수 중에서 절대값이 최소가 되는 수는
// 몇 번째 인지 그 순서를 반환한다.
// 맨 앞의 인수가 절대값이 최소면 1 을 반환한다.
// 두 번째 인수의 절대값이 최소면 2 를 반환한다.
// 세 번째 인수의 절대값이 최소면 3 을 반환한다.
// 이 함수는 양방향 원형 연결리스트에서 n 번째 링크를 찾는데 쓰인다.
return ( GetAbs(AI_One)<=GetAbs(AI_Two ) /******/ ?
(GetAbs(AI_One)<=GetAbs(AI_Three) ? 1 : 3) :
(GetAbs(AI_Two)<=GetAbs(AI_Three) ? 2 : 3)
/****/ );
};/*
2021-02-25 17:27:36 +09:00
static ZTypIntI GetAbsMinOrder(TTypSize AI_One,TTypSize AI_Two, TTypSize AI_Three)*/
2021-02-25 16:23:13 +09:00
public:
};/*
template<typename TTypSize> class ZtCShortCut*/
#ifdef _WIN
/*/////////////////////////////////////////////////
2021-02-25 17:27:36 +09:00
inline ZTypIntI GetLastError(){return ::GetLastError();}
2021-02-25 16:23:13 +09:00
/////////////////////////////////////////////////*/
using ::GetLastError;
template<typename TString>
2021-02-25 17:27:36 +09:00
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0)
2021-02-25 16:23:13 +09:00
{
LPVOID VP_MsgBuff; DWORD ViErrNo=(AI_ErrNo==0 ? ::GetLastError() : AI_ErrNo);
const DWORD CI_RetCode = ::FormatMessage( ///////////////
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS ,
NULL ,
ViErrNo ,
MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
(LPTSTR)&VP_MsgBuff,0,NULL
/*//////////*/ ); ///////////////////////////////////////
if(CI_RetCode==0) return false;
(ARR_BuffCStr=
((LPCTSTR)VP_MsgBuff))(", ErrNo=")(ViErrNo);
::LocalFree(VP_MsgBuff); return true;
}/*
template<typename TString>
2021-02-25 17:27:36 +09:00
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0) */
2021-02-25 16:23:13 +09:00
// defined(_WIN)
#elif defined(__unix__)
2021-02-25 17:27:36 +09:00
inline ZTypIntI GetLastError()
2021-02-25 16:23:13 +09:00
{
return errno ; // ::error 로 하면 안된다.
}/*
2021-02-25 17:27:36 +09:00
inline ZTypIntI GetLastError()*/
2021-02-25 16:23:13 +09:00
template<typename TString>
2021-02-25 17:27:36 +09:00
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0)
2021-02-25 16:23:13 +09:00
{
if(AI_ErrNo==0)
ARR_BuffCStr = ::strerror(errno );
else ARR_BuffCStr = ::strerror(AI_ErrNo);
return true; // for compatibility with window
}/*
template<typename TString>
2021-02-25 17:27:36 +09:00
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0) */
2021-02-25 16:23:13 +09:00
//#elif defined(__unix__)
#else
2021-02-25 17:27:36 +09:00
inline ZTypIntI GetLastError(){return errno ;}
2021-02-25 16:23:13 +09:00
template<typename TString>
2021-02-25 17:27:36 +09:00
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0)
2021-02-25 16:23:13 +09:00
{
if(AI_ErrNo==0)
ARR_BuffCStr = ::strerror(errno );
else
ARR_BuffCStr = ::strerror(AI_ErrNo);
//else
return true; // for compatibility with window
}/*
template<typename TString>
2021-02-25 17:27:36 +09:00
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0) */
2021-02-25 16:23:13 +09:00
#endif
// 절대값을 가져온다.
template<typename TLong> TLong ABS(TLong AL_Value)
{
if(AL_Value<0) return -AL_Value; return AL_Value;
}/*
template<typename TLong> TLong ABS(TLong AL_Value) */
template<typename TypeInt>
2021-02-25 17:27:36 +09:00
TypeInt AToInt(const char* ApcChar, ZTypIntI AI_Length)
2021-02-25 16:23:13 +09:00
{
if(AI_Length<1) return 0;
while(AI_Length>0 && ApcChar[AI_Length-1]==' ')
--AI_Length; // 뒤에 있는 공백을 제외.
//while
if(AI_Length<1) return 0;
const char* VPC_Char =ApcChar+AI_Length-1;
TypeInt VL_Temp;
TypeInt VL_Result =(*VPC_Char--)-'0';
TypeInt VL_Multiple=1;
while(--AI_Length>0)
{
if((VL_Temp=*VPC_Char--)<'0' || VL_Temp>'9' ) return 0;
VL_Result += (VL_Multiple*=10)*(VL_Temp-'0') ; ////////
}/*
while(--AI_Length>0)*/
return VL_Result;
}/*
template<typename TypeInt>
2021-02-25 17:27:36 +09:00
TypeInt AToInt(const char* ApcChar, ZTypIntI AI_Length) */
2021-02-25 16:23:13 +09:00
#ifdef _WIN
2021-02-25 17:45:17 +09:00
inline ZTypLLong ATOLL(const char* ApcChar)
2021-02-25 16:23:13 +09:00
{
if(ApcChar==0) return 0; return ::_atoi64(ApcChar);
}/*
2021-02-25 17:45:17 +09:00
inline ZTypLLong ATOLL(const char* ApcChar)*/
2021-02-25 16:23:13 +09:00
#else // !defined(_WIN)
2021-02-25 17:45:17 +09:00
inline ZTypLLong ATOLL(const char* ApcChar)
2021-02-25 16:23:13 +09:00
{
if(ApcChar==0) return 0; return ::atoll(ApcChar);
}/*
2021-02-25 17:45:17 +09:00
inline ZTypLLong ATOLL(const char* ApcChar)*/
2021-02-25 16:23:13 +09:00
#endif // !defined(_WIN)
2021-02-25 17:45:17 +09:00
inline ZTypLLong ATOLL(const char* ApcChar, ZTypIntI AI_Length)
2021-02-25 16:23:13 +09:00
{
2021-02-25 17:47:58 +09:00
return AToInt<ZTypLLong>(ApcChar, AI_Length);
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:45:17 +09:00
inline ZTypLLong ATOL(const char* ApcChar, ZTypIntI AI_Length)*/
2021-02-25 16:23:13 +09:00
2021-02-25 17:45:17 +09:00
inline ZTypLong ATOL(const char* ApcChar)
2021-02-25 16:23:13 +09:00
{
if(ApcChar==0) return 0; return atol(ApcChar);
}/*
2021-02-25 17:45:17 +09:00
inline ZTypLong ATOL(const char* ApcChar)*/
2021-02-25 16:23:13 +09:00
2021-02-25 17:45:17 +09:00
inline ZTypLong ATOL(const char* ApcChar, ZTypIntI AI_Length)
2021-02-25 16:23:13 +09:00
{
2021-02-25 17:47:58 +09:00
return AToInt<ZTypLong>(ApcChar, AI_Length);
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:45:17 +09:00
inline ZTypLong ATOL(const char* ApcChar, ZTypIntI AI_Length)*/
2021-02-25 16:23:13 +09:00
2021-02-25 17:27:36 +09:00
inline ZTypIntI ATOI(const char* ApcChar)
2021-02-25 16:23:13 +09:00
{
if(ApcChar==0) return 0; return atoi(ApcChar);
}/*
2021-02-25 17:27:36 +09:00
inline ZTypIntI ATOI(const char* ApcChar)*/
2021-02-25 16:23:13 +09:00
2021-02-25 17:27:36 +09:00
inline ZTypIntI ATOI(const char* ApcChar, ZTypIntI AI_Length)
2021-02-25 16:23:13 +09:00
{
2021-02-25 17:27:36 +09:00
return AToInt<ZTypIntI>(ApcChar, AI_Length);
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:27:36 +09:00
inline ZTypIntI ATOI(const char* ApcChar, ZTypIntI AI_Length)*/
2021-02-25 16:23:13 +09:00
inline double ATOD(const char* ApcChar)
{
return ApcChar==0 ? 0 : ::atof(ApcChar) ;
}/*
inline double ATOD(const char* ApcChar)*/
2021-02-25 17:47:58 +09:00
template<typename TTypeCh>
inline ZTypLength GetLength(const TTypeCh* ApcChar)
2021-02-25 16:23:13 +09:00
{
2021-02-25 17:47:58 +09:00
if(ApcChar==0) return 0;
ZTypLength VL_Length=0 ;
while(*(ApcChar+VL_Length)!=_T('\0'))
++VL_Length;
/////////////////////////////////////
return VL_Length;
2021-02-25 16:23:13 +09:00
}/*
2021-02-25 17:47:58 +09:00
template<typename TTypeCh>
inline ZTypLength GetLength(const TTypeCh* ApcChar) */
2021-02-25 16:23:13 +09:00
template<typename TTypeSize, typename TTypeCh>
inline TTypeSize GetLengthType(const TTypeCh* ApcChar)
{
if(ApcChar==0) return 0;
2021-02-25 17:45:17 +09:00
TTypeSize VL_Length=0 ;
2021-02-25 16:23:13 +09:00
while(*(ApcChar+VL_Length)!=_T('\0'))
++VL_Length;
2021-02-25 17:45:17 +09:00
/////////////////////////////////////
return VL_Length;
2021-02-25 16:23:13 +09:00
}/*
template<typename TTypeSize, typename TTypeCh>
inline TTypeSize GetLengthType(const TTypeCh* ApcChar) */
/*//////////////////////////////////////////////////////////////////////////////////////
CopyChars() AL_DestSize , ZNsWin.H CRegistry
Windows Strsafe.h StringCchCopy() . mingw
Strsafe.h . StringCchCopy() .
HRESULT StringCchCopy(
__out LPTSTR pszDest,
__in size_t cchDest,
__in LPCTSTR pszSrc
);
This function can return one of the following values. It is strongly recommended
that you use the SUCCEEDED and FAILED macros to test the return value of this function.
Return code
S_OK : Source data was present, fully copied without truncation, and the resultant
destination buffer is null-terminated.
STRSAFE_E_INVALID_PARAMETER : The value in cchDest is either 0 or larger than STRSAFE_MAX_CCH.
STRSAFE_E_INSUFFICIENT_BUFFER : The copy operation failed due to insufficient buffer
space. The destination buffer contains a truncated, null-terminated version of the
intended result. In situations where truncation is acceptable, this may not necessarily
be seen as a failure condition.
-- 2012-08-15 07:40:00
//////////////////////////////////////////////////////////////////////////////////////*/
template<typename TTypeCh, typename TTypeSize>
TTypeSize CopyChars(TTypeCh* ApcDest, TTypeSize AL_DestSize, const TTypeCh* ApcSource)
{
/* ApcSource must be null-terminated. AL_DestSize
must be equal to or more than strlen(ApcSource)+1.
Null ApcDest . */
if(ApcSource==0) return 0;
TTypeSize VL_SourceSize=0 ;
TTypeCh* VPC_Dest =ApcDest ;
const TTypeCh* VPC_Source =ApcSource;
for(; VL_SourceSize<AL_DestSize; ++VL_SourceSize)
{
if(*ApcSource==0)
{
if(VL_SourceSize<AL_DestSize+1)
{
*VPC_Dest=0; return VL_SourceSize+1;
}/*
if(VL_SourceSize<AL_DestSize+1)*/
return VL_SourceSize;
}/*
if(*ApcSource==0)*/
*VPC_Dest = *VPC_Source;
}/*
for(; VL_SourceSize<AL_DestSize; ++VL_SourceSize)*/
}/*
template<typename TTypeCh, typename TTypeSize>
TTypeSize CopyChars(TTypeCh* ApcDest, TTypeSize AL_DestSize, const TTypeCh* ApcSource) */
template<typename TType> class ZtCInit
{
public:
void operator()(TType& AR_TypeArg){}
public:
void OnInit(TType& AR_TypeArg){}
void OnFini(TType& AR_TypeArg){}
public:
};/*
template<typename TType> class ZtCInit*/
class ZCInit
{
public:
template<typename TType> void operator()(TType& AR_TypeArg){}
template<typename TType> void OnInit (TType& AR_TypeArg){}
template<typename TType> void OnFini (TType& AR_TypeArg){}
void OnInit(){}
void OnFini(){}
public:
};/*
class ZCInit*/
class CExceptBase
{
public: void* operator()(){return 0;}
};/*
class CExceptBase*/
// 예외 기반 클래스를 template 로 하면 여러 기법을 사용할 수 있다.
template< typename TType, typename TypeArg=const TType&
>
class CExceptBase_T /*/////////////////////////////////*/
{
protected:
TType mo_Type;
public :
CExceptBase_T(){}
CExceptBase_T(TypeArg TypeArgObj):mo_Type(TypeArgObj){}
TType& operator()(){return mo_Type;}
public :
};/*
template< typename TType, typename TypeArg=const TType&
>
class CExceptBase_T ///////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////
private .
template class class member template , class object
, ,
class class .
, CAsyncServ_H CAsyncServ_T<> ,
.
-- 2010-12-20 23:51:00
/////////////////////////////////////////////////////////////////////////////////*/
class CNonCopyable
{
private:
CNonCopyable(const CNonCopyable& rhs){}
CNonCopyable& operator=(const CNonCopyable& rhs){return *this;}
public :
CNonCopyable(){}
public :
};/*
class CNonCopyable*/
/*///////////////////////////////////////////////////////////////////////////
- - class
class ZCFreeAllocBase . object
.
///////////////////////////////////////////////////////////////////////////*/
class ZCFreeAllocBase
{
public:
virtual ~ZCFreeAllocBase(){}
virtual long GetHeapSize() const{return 0;}
virtual long GetMemSize () const{return 0;}
const char* GetTypeName() const
{
return typeid(*this).name();
}/*
const char* GetTypeName() const*/
virtual void DeleteAllInHeap(){}
public:
};/*
class ZCFreeAllocBase*/
// 자유 기억 공간을 총괄하는 단방향 연결 리스트
class ZCHeapAllocList
{
public:
class ZCLink
{
public:
friend class ZCHeapAllocList;
public:
ZCLink(ZCFreeAllocBase& ArCFreeAllocBase):mr_AllocBase(ArCFreeAllocBase), mp_NextLink(0)
{
}/*
ZCLink(ZCFreeAllocBase& ArCFreeAllocBase)*/
ZCLink* GetNextLink()
{
return mp_NextLink;
}/*
ZCLink* GetNextLink()*/
ZCLink* GetNextLink(long AL_Distance)
{
ZCLink* VP_NowLink=this;
while(--AL_Distance>=0)
VP_NowLink=VP_NowLink->mp_NextLink;
return VP_NowLink;
}/*
ZCLink* GetNextLink(long AL_Distance)*/
ZCFreeAllocBase& GetData()
{
return mr_AllocBase;
}/*
ZCFreeAllocBase& GetData()*/
/*public :*/
private:
ZCFreeAllocBase& mr_AllocBase;
ZCLink* mp_NextLink ;
private:
};/*
class ZCLink*/
/*public :*/
private:
ZTypIntL ml_Size ;
ZCLink* mp_HeadLink ;
ZCLink* mp_TailLink ;
private:
void AddLink(ZCLink* AP_NewLink)
{
if(ml_Size++ == 0)
{
mp_HeadLink= mp_TailLink=AP_NewLink ;
mp_TailLink->mp_NextLink=mp_HeadLink;
}
else
{
mp_TailLink->mp_NextLink=AP_NewLink ;
AP_NewLink ->mp_NextLink=mp_HeadLink;
mp_TailLink=mp_TailLink->mp_NextLink;
}/*
else*/
}/*
void AddLink(ZCLink* AP_NewLink)*/
/*private:*/
public :
ZCHeapAllocList()
{
ml_Size =0;
mp_HeadLink =0;
mp_TailLink =0;
}/*
ZCHeapAllocList()*/
template<typename TypeFreeAlloc> TypeFreeAlloc& AddFreeAlloc()
{
// TypeFreeAlloc 은 ZCFreeAllocBase 의 파생클래스여야 한다.
TypeFreeAlloc* VP_TypeFreeAlloc=new TypeFreeAlloc;
ZCLink* VP_NewLink=new ZCLink(*VP_TypeFreeAlloc);
AddLink(VP_NewLink); return *VP_TypeFreeAlloc;
}/*
template<typename TypeFreeAlloc> TypeFreeAlloc& AddFreeAlloc() */
void AddFreeAllocBase(ZCFreeAllocBase& ArCFreeAllocBase)
{
AddLink( new ZCLink(ArCFreeAllocBase) );
}/*
void AddFreeAllocBase(ZCFreeAllocBase& ArCFreeAllocBase)*/
ZCFreeAllocBase& GetData(long AL_Index)
{
return mp_HeadLink->GetNextLink(AL_Index-1)->mr_AllocBase;
}/*
ZCFreeAllocBase& GetData(long AL_Index)*/
ZCLink* GetHeadLink()
{
return mp_HeadLink;
}/*
ZCLink* GetHeadLink()*/
template<typename DeriveType> DeriveType& GetDataType(long AL_Index)
{
return static_cast<DeriveType&>( mp_HeadLink->GetNextLink(AL_Index-1)->mr_AllocBase );
}/*
template<typename DeriveType> DeriveType& GetDataType(long AL_Index) */
void FreeAll()
{
ZCLink* VP_Link=mp_HeadLink;
for(long i=1; i<=ml_Size; ++i)
{
VP_Link->mr_AllocBase.DeleteAllInHeap();
VP_Link=VP_Link->mp_NextLink;
}/*
for(long i=1; i<=ml_Size; ++i)*/
}/*
void FreeAll()*/
void DeleteAll()
{
ZCLink* VP_CutLink=0;
for(long i=1; i<=ml_Size; ++i)
{
VP_CutLink =mp_HeadLink;
mp_HeadLink=mp_HeadLink->mp_NextLink;
delete VP_CutLink;
}/*
for(long i=1; i<=ml_Size; ++i)*/
ml_Size=0;
}/*
void DeleteAll()*/
void ClearAll()
{
ZCLink* VP_CutLink=0;
for(long i=1; i<=ml_Size; ++i)
{
VP_CutLink =mp_HeadLink ;
mp_HeadLink=mp_HeadLink->mp_NextLink;
VP_CutLink->
mr_AllocBase.DeleteAllInHeap() ;
delete VP_CutLink;
}/*
for(long i=1; i<=ml_Size; ++i)*/
ml_Size=0;
}/*
void ClearAll()*/
ZTypIntL GetSize() const
{
return ml_Size;
}/*
ZTypIntL GetSize() const*/
public:
};/*
class ZCHeapAllocList*/
static ZCHeapAllocList& GetCHeapAllocList()
{
static ZCHeapAllocList SO_CHeapAllocList; return SO_CHeapAllocList;
}/*
static ZCHeapAllocList& GetCHeapAllocList()*/
/*//////////////////////////////////////////////////////////////////
릿 object
, object
object enum typedef
. object 릿
ZtCObjectPtr<> .
2021-02-26 17:55:33 +09:00
typedef ZtCStringBase<char > CStringBase;
typedef ZtCObjectPtr <CStringBase> CObjectPtr ;
2021-02-25 16:23:13 +09:00
CStringBase::TTypeChar
CObjectPtr::TypeData::TTypeChar .
ZtCObjectPtr<>
ZtCTypeData<> . .
-- 2010-01-24 22:25:00
//////////////////////////////////////////////////////////////////*/
template<typename TType> class ZtCObjectPtr
{
public :
typedef TType TypeData;
protected:
TType& mr_TypeData;
public :
ZtCObjectPtr(TType& ArCData):mr_TypeData(ArCData){}
TType* operator->(){return &mr_TypeData;}
TType& operator* (){return mr_TypeData;}
operator TType& (){return mr_TypeData;}
public :
};/*
template<typename TType> class ZtCObjectPtr */
/*/////////////////////////////////////////////////////////
object heap , .
-- 2014-07-20 04:49:00
/////////////////////////////////////////////////////////*/
template< typename TType, typename TAllocClass=ZCAllocClass
>
class ZtCObjectNew : public TAllocClass ////////////////////
{
public :
typedef TType TypeData ;
typedef TAllocClass ZCAllocator;
private:
struct StTypeRefCnt
{
TType MO_TypeData;
ZTypInt MI_RefCount;
StTypeRefCnt(){MI_RefCount=0;}
};/*
struct StTypeRefCnt*/
private:
StTypeRefCnt* mp_StTypeRefCnt;
public :
ZtCObjectNew()
{
mp_StTypeRefCnt = (StTypeRefCnt*)
this->ZCAllocator::NewMem( sizeof(StTypeRefCnt) );
mp_StTypeRefCnt->MI_RefCount = 1 ;
new(&mp_StTypeRefCnt->MO_TypeData) TypeData;
}/*
ZtCObjectNew()*/
ZtCObjectNew(const TypeData& AR_TypeData)
{
mp_StTypeRefCnt = (StTypeRefCnt*)
this->ZCAllocator::NewMem( sizeof(StTypeRefCnt) );
mp_StTypeRefCnt->MI_RefCount = 1 ;
new(&mp_StTypeRefCnt->MO_TypeData) TypeData(AR_TypeData);
}/*
ZtCObjectNew(const TypeData& AR_TypeData)*/
template<typename TTypeArg1, typename TTypeArg2>
ZtCObjectNew(TTypeArg1& ArTTypeArg1, TTypeArg2& ArTTypeArg2)
{
mp_StTypeRefCnt = (StTypeRefCnt*)
this->ZCAllocator::NewMem(sizeof(StTypeRefCnt));
mp_StTypeRefCnt->MI_RefCount = 1 ;
new(&mp_StTypeRefCnt->MO_TypeData)
TypeData(ArTTypeArg1, ArTTypeArg2);
}/*
template<typename TTypeArg1, typename TTypeArg2>
ZtCObjectNew(TTypeArg1& ArTTypeArg1, TTypeArg2& ArTTypeArg2))*/
ZtCObjectNew(const ZtCObjectNew& rhs)
{
mp_StTypeRefCnt=rhs.mp_StTypeRefCnt; ++mp_StTypeRefCnt->MI_RefCount;
}/*
ZtCObjectNew(const ZtCObjectNew& rhs)*/
~ZtCObjectNew()
{
if(--mp_StTypeRefCnt->MI_RefCount<=0) this->ZCAllocator::DeleteMem(mp_StTypeRefCnt);
}/*
~ZtCObjectNew()*/
ZtCObjectNew& operator=(const ZtCObjectNew& rhs)
{
if(this==&rhs || mp_StTypeRefCnt==rhs.mp_StTypeRefCnt) return *this;
#if(0)
mp_StTypeRefCnt->MO_TypeData = rhs.mp_StTypeRefCnt->MO_TypeData; return *this;
#else
if(--mp_StTypeRefCnt->MI_RefCount<=0) this->ZCAllocator::DeleteMem(mp_StTypeRefCnt);
mp_StTypeRefCnt = rhs.mp_StTypeRefCnt; ++mp_StTypeRefCnt->MI_RefCount; return *this;
#endif
}/*
ZtCObjectNew& operator=(const ZtCObjectNew& rhs)*/
ZtCObjectNew& operator=(const TypeData& AR_TypeData)
{
if(&mp_StTypeRefCnt->MO_TypeData==&AR_TypeData) return *this;
mp_StTypeRefCnt->MO_TypeData = AR_TypeData; return *this;
}/*
ZtCObjectNew& operator=(const TypeData& AR_TypeData)*/
TypeData& operator* (){return mp_StTypeRefCnt->MO_TypeData;}
TypeData* operator->(){return &mp_StTypeRefCnt->MO_TypeData;}
operator TypeData& (){return mp_StTypeRefCnt->MO_TypeData;}
ZTypInt GetRefCnt() const{return mp_StTypeRefCnt->MI_RefCount;}
TypeData* GetObjPtr() const{return &mp_StTypeRefCnt->MO_TypeData;}
public :
};/*
template< typename TType, typename TAllocClass=ZCAllocClass
>
class ZtCObjectNew : public TAllocClass //////////////////*/
#ifdef _DEBUG
/*/////////////////////////////////////////////////////////////////////
_REENTRANT .
_REENTRANT .
-- 2009-12-23 10:38:00
/////////////////////////////////////////////////////////////////////*/
inline void _DEBUG_REENTRANT_Check()
{
if(_REENTRANT_BOOL_<1)
{
std::fstream fileout("DEBUG.txt", std::ios::out | std::ios::app);
fileout<<"◆◆ Error! : _REENTRANT is Not Defined In Multi-Thread"<<std::endl;
fileout.close();
::exit(1);
}/*
if(_REENTRANT_BOOL_<1)*/
}/*
inline void _DEBUG_REENTRANT_Check()*/
#define _DEBUG_REENTRANT_CHECK_ _DEBUG_REENTRANT_Check();
#else // !defined(_DEBUG)
#define _DEBUG_REENTRANT_CHECK_
#endif // !defined(_DEBUG)
#if defined(_REENTRANT)
class ZCExceptSmallLock : public CExceptBase
{
private:
long ml_ErrCode;
string mo_ErrMSG ;
public :
ZCExceptSmallLock(long AL_ErrCode, const char* AP_ErrMSG)
{
ml_ErrCode=AL_ErrCode; //////////////
if(AP_ErrMSG!=0) mo_ErrMSG=AP_ErrMSG;
}/*
ZCExceptSmallLock(long AL_ErrCode, const char* AP_ErrMSG)*/
long GetErrCode() const{return ml_ErrCode;}
const string& GetErrMSG() const{return mo_ErrMSG;}
public:
};/*
class ZCExceptSmallLock*/
#endif //defined(_REENTRANT)
#if defined(_REENTRANT) && defined(_WIN)
/*//////////////////////////////////////////////////////
object .
BOOL TryEnterCriticalSection(LPCRITICAL_SECTION)
.
//////////////////////////////////////////////////////*/
class ZCMutexSmallLock;
class ZCMutexSmallInit
{
private:
HANDLE mh_Mutex;
public :
void Lock() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode = ::WaitForSingleObject(mh_Mutex, INFINITE))==WAIT_ABANDONED)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::Lock()");
}/*
if((VL_ErrCode = ::WaitForSingleObject(mh_Mutex, INFINITE))==WAIT_ABANDONED)*/
}/*
void Lock() throw(ZCExceptSmallLock&)*/
void UnLock()
{
::ReleaseMutex(mh_Mutex);
}/*
void UnLock()*/
ZCMutexSmallInit()
{
/* MUTEX 를 신호 상태로 만들고 이 함수를 호출한 쓰레드가 MUTEX 를 소유하지 않게
. . */
mh_Mutex = ::CreateMutex(NULL, FALSE, NULL);
}/*
ZCMutexSmallInit()*/
~ZCMutexSmallInit()
{
::CloseHandle(mh_Mutex);
}/*
~ZCMutexSmallInit()*/
public:
};/*
class ZCMutexSmallInit*/
class ZCMutexSmallLock
{
private:
ZCMutexSmallInit& mr_ZCMutexInit;
public :
ZCMutexSmallLock(ZCMutexSmallInit& ArZCMutexInit):mr_ZCMutexInit(ArZCMutexInit)
{
mr_ZCMutexInit.Lock();
}/*
ZCMutexSmallLock(ZCMutexSmallInit& ArZCMutexInit)*/
~ZCMutexSmallLock()
{
mr_ZCMutexInit.UnLock();
}/*
~ZCMutexSmallLock()*/
public:
};/*
class ZCMutexSmallLock*/
#elif defined(_REENTRANT) && defined(__unix__)
// 유닉스(특히 리눅스) 상에서 _REENTRANT 이 정의되어 있으면
// -lpthread 옵션을 잊지 말 것.
class ZCMutexSmallLock;
class ZCMutexSmallInit
{
private:
::pthread_mutex_t mo_Mutex;
public :
void Lock() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_lock(&mo_Mutex))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::Lock()");
}/*
if((VL_ErrCode=::pthread_mutex_lock(&mo_Mutex))!=0)*/
}/*
void Lock() throw(ZCExceptSmallLock&)*/
void UnLock() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_unlock(&mo_Mutex))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::UnLock()");
}/*
if((VL_ErrCode=::pthread_mutex_unlock(&mo_Mutex))!=0)*/
}/*
void UnLock() throw(ZCExceptSmallLock&)*/
ZCMutexSmallInit() throw(ZCExceptSmallLock&)
{
::pthread_mutexattr_t VO_MutexAttr;
::pthread_mutexattr_init(&VO_MutexAttr);
::pthread_mutexattr_settype(&VO_MutexAttr, PTHREAD_MUTEX_RECURSIVE);
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_init(&mo_Mutex, &VO_MutexAttr))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::ZCMutexSmallInit()");
}/*
if((VL_ErrCode=::pthread_mutex_init(&mo_Mutex, &VO_MutexAttr))!=0)*/
}/*
ZCMutexSmallInit() throw(ZCExceptSmallLock&)*/
~ZCMutexSmallInit() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_destroy(&mo_Mutex))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::~ZCMutexSmallInit()");
}/*
if((VL_ErrCode=::pthread_mutex_destroy(&mo_Mutex))!=0)*/
}/*
~ZCMutexSmallInit() throw(ZCExceptSmallLock&)*/
public:
};/*
class ZCMutexSmallInit*/
class ZCMutexSmallLock
{
private:
ZCMutexSmallInit& mr_ZCMutexInit;
public :
ZCMutexSmallLock(ZCMutexSmallInit& ArZCMutexInit):mr_ZCMutexInit(ArZCMutexInit)
{
mr_ZCMutexInit.Lock();
}/*
ZCMutexSmallLock(ZCMutexSmallInit& ArZCMutexInit)*/
~ZCMutexSmallLock()
{
mr_ZCMutexInit.UnLock();
}/*
~ZCMutexSmallLock()*/
public:
};/*
class ZCMutexSmallLock*/
// defined(_REENTRANT) && defined(__unix__)
#elif defined(_REENTRANT)
// _REENTRANT 이 정의되어 있으면 -lpthread 옵션을 잊지 말 것.
class ZCMutexSmallLock;
class ZCMutexSmallInit
{
private:
::pthread_mutex_t mo_Mutex;
public :
void Lock() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_lock(&mo_Mutex))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::Lock()");
}/*
if((VL_ErrCode=::pthread_mutex_lock(&mo_Mutex))!=0)*/
}/*
void Lock() throw(ZCExceptSmallLock&)*/
void UnLock() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_unlock(&mo_Mutex))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::UnLock()");
}/*
if((VL_ErrCode=::pthread_mutex_unlock(&mo_Mutex))!=0)*/
}/*
void UnLock() throw(ZCExceptSmallLock&)*/
ZCMutexSmallInit() throw(ZCExceptSmallLock&)
{
::pthread_mutexattr_t VO_MutexAttr;
::pthread_mutexattr_init(&VO_MutexAttr);
::pthread_mutexattr_settype(&VO_MutexAttr, PTHREAD_MUTEX_RECURSIVE);
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_init(&mo_Mutex, &VO_MutexAttr))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::ZCMutexSmallInit()");
}/*
if((VL_ErrCode=::pthread_mutex_init(&mo_Mutex, &VO_MutexAttr))!=0)*/
}/*
ZCMutexSmallInit() throw(ZCExceptSmallLock&)*/
~ZCMutexSmallInit() throw(ZCExceptSmallLock&)
{
long VL_ErrCode=0;
if((VL_ErrCode=::pthread_mutex_destroy(&mo_Mutex))!=0)
{
throw ZCExceptSmallLock(VL_ErrCode, "ZCMutexSmallInit::~ZCMutexSmallInit()");
}/*
if((VL_ErrCode=::pthread_mutex_destroy(&mo_Mutex))!=0)*/
}/*
~ZCMutexSmallInit() throw(ZCExceptSmallLock&)*/
public:
};/*
class ZCMutexSmallInit*/
class ZCMutexSmallLock
{
private:
ZCMutexSmallInit& mr_ZCMutexInit;
public :
ZCMutexSmallLock(ZCMutexSmallInit& ArZCMutexInit):mr_ZCMutexInit(ArZCMutexInit)
{
mr_ZCMutexInit.Lock();
}/*
ZCMutexSmallLock(ZCMutexSmallInit& ArZCMutexInit)*/
~ZCMutexSmallLock()
{
mr_ZCMutexInit.UnLock();
}/*
~ZCMutexSmallLock()*/
public :
};/*
class ZCMutexSmallLock*/
#endif //defined(_REENTRANT)
#if defined(_DEBUG) && defined(_REENTRANT)
class ZCSyncLog
{
private :
typedef ZCMutexSmallInit CSync;
protected:
static CSync& GetCSync()
{
static CSync SO_CSyncLog; return SO_CSyncLog;
}/*
static CSync& GetCSync()*/
public :
ZCSyncLog (){GetCSync().Lock ();}
~ZCSyncLog(){GetCSync().UnLock();}
public :
};/*
class ZCSyncLog*/
#endif // defined(_DEBUG) && defined(_REENTRANT)
#ifdef _DEBUG
static inline void WriteError(const char* ApcErrorStr)
{
std::fstream fileout(
"DEBUG.txt", std::ios::out | std::ios::app);
fileout<<ApcErrorStr<<std::endl;
fileout.close();
::exit(1);
}/*
static inline void WriteError(const char* ApcErrorStr)*/
/*///////////////////////////////////////////////////////////////////
object object container .
container (DEBUG )
Stack container new
. container container new,
delete .
///////////////////////////////////////////////////////////////////*/
class ZCCheckAlloc
{
public :
class ZCAllowAlloc; friend class ZCAllowAlloc;
private:
static bool& GetAllowAllocBool()
{
static bool SB_AllowAlloc=false; return SB_AllowAlloc;
}/*
static bool& GetAllowAllocBool()*/
/*private:*/
public :
ZCCheckAlloc()
{
if(GetAllowAllocBool()==false)
{
cout<<endl<<"Warning! Unallowed Object Memory Allocation!"<<endl<<endl;
}/*
if(GetAllowAllocBool()==false)*/
}/*
ZCCheckAlloc()*/
static bool IsAllowAlloc()
{
return GetAllowAllocBool();
}/*
static bool IsAllowAlloc()*/
/*public:*/
public:
class ZCAllowAlloc
{
private:
bool mb_AllowAlready ;
/*///////////////////////////////////////////////////////
ZCAllowAlloc object
,
ZCCheckAlloc::GetAllowAllocBool()=false;
.
ZCCheckAlloc::GetAllowAllocBool() true .
--
///////////////////////////////////////////////////////*/
/*private:*/
public :
ZCAllowAlloc()
{
mb_AllowAlready=ZCCheckAlloc::GetAllowAllocBool();
ZCCheckAlloc::GetAllowAllocBool()=true; //////////
}/*
ZCAllowAlloc()*/
~ZCAllowAlloc()
{
if(mb_AllowAlready==false) ZCCheckAlloc::GetAllowAllocBool()=false;
}/*
ZCAllowAlloc()*/
public:
};/*
class ZCAllowAlloc()*/
public:
};/*
class ZCCheckAlloc*/
static ZTypIntL SI_Count_DEBUG=0;
#endif //_DEBUG
namespace ZNsConst
{
#if defined(_WIN)
#define __DIR_DELIMITERS__ "\\"
#define __DIR_DELIMITER__ '\\'
ZTypCPCCh CPC_DirDelimiter="\\";
ZTypCChar CC_DirDelimiter ='\\';
#else //!(defined(_WIN)
#define __DIR_DELIMITERS__ "/"
#define __DIR_DELIMITER__ '/'
ZTypCPCCh CPC_DirDelimiter="/";
ZTypCChar CC_DirDelimiter ='/';
#endif //!(defined(_WIN)
}/*
namespace ZNsConst*/
}/*
namespace ZNsMain*/
namespace ZNsCPP
{
2021-03-04 18:02:17 +09:00
using ZNsMain::IterEasyID;
2021-02-25 16:23:13 +09:00
/* 이 이름공간에는 ZNsMain 에 있는 라이브러리 보다 좀더 thread-safe
, gerneric .
*/
namespace ZNsInterface
{
}/*
namespace ZNsInterface*/
namespace ZNsIFace
{
using namespace ZNsInterface;
}/*
namespace ZNsIFace*/
namespace ZNsType
{
}/*
namespace ZNsType*/
namespace ZNsEnum
{
}/*
namespace ZNsEnum*/
namespace ZNsConst
{
}/*
namespace ZNsConst*/
}/*
namespace ZNsCPP */
/* 함수 안에서 함수를 정의할 필요가 있을 때, struct 를 이용하여 함수를 정의하는 매크로. -- 2015-09-06 05:20:00 */
#define _FUNC_IN_FUNC_START_(ZstClassName) struct ZstClassName{static void Exec
#define _FUNC_IN_FUNC_CLOSE_(ZstClassName) };
#define _FUNC_IN_FUNC_RETURN_START_(ZstClassName, ZTypeReturn) struct ZstClassName{static ZTypeReturn Exec
#define _FUNC_IN_FUNC_RETURN_CLOSE_(ZstClassName, ZTypeReturn) };
#define _FFS_(ZstClassName) _FUNC_IN_FUNC_START_(ZstClassName)
#define _FFC_(ZstClassName) _FUNC_IN_FUNC_CLOSE_(ZstClassName)
#define _FFE_(ZstClassName) }; // E 문자는 END 의 뜻.
#define _FFRS_(ZstClassName, ZTypeReturn) _FUNC_IN_FUNC_RETURN_START_(ZstClassName, ZTypeReturn)
#define _FFRC_(ZstClassName, ZTypeReturn) _FUNC_IN_FUNC_RETURN_CLOSE_(ZstClassName, ZTypeReturn)
#define _FFRE_(ZstClassName) };
#define _FFF_(ZstClassName) ZstClassName::Exec
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
_FUNC_IN_FUNC_START_ .
#include<iostream>
using namespace ZNsMain;
int main()
{
_FUNC_IN_FUNC_START_(My)
(IntI ArgiShowCnt)
{
for(int i=0; i<ArgiShowCnt; ++i) cout<<"# Show My() In Func."<<endl;
}
_FUNC_IN_FUNC_CLOSE_(My)
_FUNC_IN_FUNC_RETURN_START_(My2, Int)
(IntI ArgiShowCnt)
{
for(int i=0; i<ArgiShowCnt; ++i) cout<<"# Show My() In Func."<<endl; return ArgiShowCnt;
}
_FUNC_IN_FUNC_RETURN_CLOSE_(My2, int)
_FFS_(My3)
(IntI ArgiShowCnt)
{
for(int i=0; i<ArgiShowCnt; ++i) cout<<"# Show My() In Func."<<endl; return ArgiShowCnt;
}
_FFC_(My3)
My ::Exec(3);
My2::Exec(3);
My3::Exec(3);
return 0;
}
-- 2015-09-06 17:21:00
CNetEx.H HandleEvent . -- 2015-09-06 17:43:00
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4.1
gcc -v
.
.
$ echo 'main(){printf("hello world\n");}' | gcc -E -v -
Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
gcc version 2.7.2
/usr/lib/gcc-lib/i486-box-linux/2.7.2/cpp -lang-c -v -undef
-D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux
-D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386
-D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386)
-Amachine(i386) -D__i486__ -
--
,
echo . | gcc -dM -E -
gcc -dM -E - < /dev/null
.
ex) gcc -dM -E - < /dev/null | grep 'linux'
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1
ex) echo . | gcc -dM -E - | grep 'unix'
#define __unix 1
#define __unix__ 1
#define unix 1
ymir . http://kldp.org/node/121720
-- 2011-03-03 13:21:00
OS
: #define __linux__ 1
HP : #define __hpux__ 1
sun : #define __sun__ 1
IRIX : #define __mips__ 1
TRUE64 : #define __alpha__ 1
FreeBSD: #define __FreeBSD_cc_version 800001
#define __VERSION__ "4.2.1 20070719 [FreeBSD]"
#define __FreeBSD__ 8
AIX : #define _AIX 1
#define _AIX32 1
#define _AIX41 1
#define _AIX43 1
#define _AIX51 1
#define _AIX52 1
#define _AIX53 1
-- 2011-03-12 16:17:00
, .
#ifdef __linux__
// ... funky stuff ...
#endif // __linux__
__linux__라는 . linux가 .
POSIX .
OS Shared Library PATH (2012-04-08 19:25:00)
http://cafe335.daum.net/_c21_/bbs_search_read?grpid=TzUN&fldid=DUnV&contentval=0000szzzzzzzzzzzzzzzzzzzzzzzzz&nenc=&fenc=&q=gulim.ttf&nil_profile=cafetop&nil_menu=sch_updw
AIX LIBPATH, LD_LIBRARY_PATH
OS/2 LIBPATH
Windows NT/95 PATH
Solaris/Linux LD_LIBRARY_PATH
HP/UX SHLIB_PATH, LD_LIBRARY_PATH (64 bit only)
ex) export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/userJNI/lib
HP-UX Shared Library sl .
SUN일 LD_LIBRARY_PATH HP-UX SHLIB_PATH , AIX LIBPATH .
: HP에서 LD_LIBRARY_PATH 64 . sl
chatr SHLIB_PATH가 "사용 불가능" .
/opt/mqm/samp/bin/amqsput chatr .
chatr /opt/mqm/samp/bin/amqsput
SHLIB_PATH를 .
chatr +s enable /opt/mqm/samp/bin/amqsput
SHLIB_PATH /usr/lib (echo $SHLIB_PATH).
.
export SHLIB_PATH=$SHLIB_PATH:/usr/lib
SHLIB_PATH chatr +s .
IBM WebSphere MQ runmqsc
runmqsc D11LHP.QM
5724-B41 (C) Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED.
Starting MQSC for queue manager D11LHP.QM.
/usr/lib/dld.sl: Can't find path for shared library: libstream.2
/usr/lib/dld.sl: No such file or directory
AMQ9508: Program cannot connect to the queue manager.
No MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.
IBM WebSphere MQ ( 2217)
amqsput QL_D11LHP_B02KLNX.U1.I D11LHP.QM
Sample AMQSPUT0 start
target queue is QL_D11LHP_B02KLNX.U1.I
MQOPEN ended with reason code 2217
unable to open queue for output
Sample AMQSPUT0 end
--
--
'new operator' 'operator new' Programming
(2007/04/03 16:20)
http://blog.naver.com/cppis/60036113050
bugmail에게 More Effective C++ new와 delete에
. 'new operator' 'operator new'
.
'new operator' C++ .
-- , , , .
C++ 'new operator' . 'operator new'
Operator입니다.
, 'new operator' 'operator new' , object
." 라고 할 수 있습니다.
'operator new' Overload 'operator new' . , void*
, size_t를 . 'new operator' .
[::] new [placement] new-type-name [new-initializer]
[::] new [placement] ( type-name ) [new-initializer]
- placement
new overload . , C++ default new는
exception throw합니다. Overload new NULL을 , Overload new
.
struct nothrow_t {};
extern const nothrow_t nothrow;
void *operator new throw() (size_t, const nothrow_t& );
foo *fp = new (nothrow) foo;
if( !fp ) {
// Out of memory를 처리합니다.
}
- type-name
. type-name은 built-in user-defined .
- initializer
object를 . initializer object . 'new
operator' default object .
new 'Placement-new' , object . 'Placement-new'
.
inline void *operator new( size_t, void* p )
{
return p;
}
Automatic Variable을 'Placement-new' object . new (
Pair) delete도 .
'delete operator' object ,
'operator delete' .
reference
- More Effective C++
- MSDN
Placement-New Requires Heap-Allocated Buffers
The placement-new operator constructs an object on a pre-allocated buffer. The pre-allocated buffer has to be allocated
on the heap.
char *pbuff = new char[1024]; // heap allocation using plain new
Person *p = new (pbuff) Person; // placement new uses a pre-allocated buffer
You may be tempted to use a buffer allocated on the stack to avoid the need of explicitly freeing it:
char pbuff [1024]; //bad idea: stack allocation instead of heap
Person *p = new ( pbuff ) Person; //undefined behavior
However, the pre-allocated buffer must comply with certain alignment constraints required by C++. Memory allocated
on the heap is guaranteed to comply with these requirements. Stack memory, on the other hand, may not be properly aligned,
and hence using it for that purpose yields undefined behavior
-- heap
-- stack .
-- ( pbuff[1024] pbuff heap ,
-- .) 2008-10-26
http://kldp.org/node/76375
http://www.devx.com/tips/Tip/12756
.
.
, .
, ,
,
. .
.
.
virtual CIOCP ::SendPacket(HANDLE SocketID,const char* ApcData=0,int AI_Length=0,CSendBuffList* AP_CSendBuffList=0) // 1) 번코드
virtual CIOCPEx::SendPacket(HANDLE SocketID,const char* ApcData=0,int AI_Length=0) // 2) 번코드
1)
2) .
CIOCPEx VO_CIOCPEx;
CIOCP* VP_CIOCP=&VO_CIOCPEx;
VO_CIOCPEx->SendPacket((HANDLE)100,"my",2); // 어느 함수가 호출될까.
CIOCP::SendPacket() .
-- 2009-01-03 13:09:00
const char* CPC_MySQL_Host="localhost"
const char* const CPC_MySQL_Host="localhost" .
릿 , 릿 parameter .
.
template<typename TTypeBase>
class CMy : public TTypeBase
{
public:
void Init();
void Fini();
};
릿 CMy2
clear() .
class CMy2 : public CMy<CBaseClass>
{
public:
void clear();
};
, clear() CMy<CBaseClass>
. CMy<CBaseClass> CBaseClass
. clear() CBaseClass
. 릿
.
릿 parameter 릿 .
CHttp.H std::ZNsCGI::ZNsThpe::ZtCTypeLoadDataQuery_T<> template clear() Override ,
. clear()
ZtCTypeLoadDataQuery_T<> ::clear()
std::CLoadDataBlockOne_T<>::clear()
TTypeBase . TTypeBase
clear() ZtCTypeLoadDataQuery_T<>::clear() ,
std::CLoadDataBlockOne_T<>::clear()
this->TTypeBase ::clear()
. . . clear()
TTypeBase
std::ZNsIFace::CDeriveLoadDataQuery_T<TString>
me_ESearch ESearch_Name .
me_ESearch==ESearch_Name 2
me_ESearch!=ESearch_Name ,
me_ESearch==ESearch_Name , 3
me_ESearch==ESearch_Name ...
breakpoint ... . -- 2009-01-05 10:02:00
CHttp.H 릿 .
, .
"가상 상속의 템플릿 구현(TIVI : Template Implementation Of Virtual Inheritance)" .
CHttp.H . ,
, object .
, object (, )
. . A, B, C,D,E
B A object
C B object
D C object
E D object .
A A object
B B object
C C object
D D object .
object . "가상 상속의 템플릿 구현" .
-- 2009-01-18 17:48:00
, "가상 상속의 템플릿 구현" , ' '
. .
. .
-- 2009-01-19 01:21:00
object A,B,C,D,E .
A
A ( ) B
B ( ) C
C ( ) D .
,
A
A ( ) B
B ( ) C
C ( ) D .
-- 2009-01-19 01:26:00
.
(WTM Working Thread Model)
A IOCP A-WTM
B IOCP B-WTM
C IOCP C-WTM ...
A,B C,D ,
A,B IOCP AB-WTM
C,D IOCP CD-WTM ...
--
COM(Component Object Model) .
cf) std::ZNsIFace::ZIDelgtMSG
-- 2009-03-09 20:18:00
"가상 상속의 템플릿 구현" A, B, C, D
. A, B, C, D 릿 ,
A, B, C, D E , E A, B, C, D .
.
cf) MainHead_VirtualDeriveTmpl.cpp
"가상 상속의 템플릿 구현" CURIOUSLY RECURRING TEMPLATE PATTERN .
class template A class B1,B2,B3 , class B1, B2, B3 A
. class B1, B2, B3 .
class B1, B2, B3 , A A2 , A2 B1, B2, B3 interface
, B1 B2 B3 interface .
ex)
1) 릿 class template A .
2) A B1, B2, B3
B1, B2, B3 A .
3) A , B1, B2, B3 object ,
.
template<typename TParent>
class A
{
public:
void UseB1(){static_cast<TParent*>(this)->GetObjB1().CallFunc();}
void UseB2(){static_cast<TParent*>(this)->GetObjB2().CallFunc();}
void UseB3(){static_cast<TParent*>(this)->GetObjB3().CallFunc();}
void UseExB1(TParent& ArCParent){static_cast<TParent*>(this)->GetObjB1().CallFunc(ArCParent);}
void UseExB2(TParent& ArCParent){static_cast<TParent*>(this)->GetObjB2().CallFunc(ArCParent);}
void UseExB3(TParent& ArCParent){static_cast<TParent*>(this)->GetObjB3().CallFunc(ArCParent);}
};
class A2 : public A<A2>
{
public:
class B1{public:void CallFunc() {cout<<"Call B1::CallFunc()"<<endl;}
void CallFunc(A2& ArA2){cout<<"Call B1::CallFunc(A2)"<<endl;}};
class B2{public:void CallFunc() {cout<<"Call B2::CallFunc()"<<endl;}
void CallFunc(A2& ArA2){cout<<"Call B2::CallFunc(A2)"<<endl;}};
class B3{public:void CallFunc() {cout<<"Call B3::CallFunc()"<<endl;}
void CallFunc(A2& ArA2){cout<<"Call B3::CallFunc(A2)"<<endl;}};
private:
B1 b1;
B2 b2;
B3 b3;
public:
B1 GetObjB1(){return b1;}
B2 GetObjB2(){return b2;}
B3 GetObjB3(){return b3;}
void UseExB1(){A<A2>::UseExB1(*this);}
void UseExB2(){A<A2>::UseExB2(*this);}
void UseExB3(){A<A2>::UseExB3(*this);}
};
A2 myA2;
myA2.UseB1();
myA2.UseB2();
myA2.UseB3();
myA2.UseExB1();
myA2.UseExB2();
myA2.UseExB3();
-- 2010-03-12 11:56:00
. A,B,C
IA, IB, IC , A, B, C IA, IB, IC . IA, IB, IC
singleton object SngtA, SngtB, SngtC , A, B, C , (
), SngtA, SngtB, SngtC .
A, B, C singleton object SngtA, SngtB, SngtC interface .
.
-- 2010-03-13 22:43:00
pool P1 class A, B , A,B P1 , B P1
P1 . / A => P1 => B . P1 B
, P1 릿 , P1 Instance
B 릿 B .
릿 CThreadEx_T<> CProxySockHttpXml.H .
-- 2009-08-09 20:23:00
( ) ,
,
. , ,
.
-- 2009-02-10 23:02:00
VC++ 2008 "도구 => 옵션 => '프로젝트 밑 솔루션' => VC++ 디렉토리"
"포함파일" "라이브러리 파일" .
"프로젝트 => 속성" .
-- 2009-02-27 10:02:00
릿 . -- 2009-02-28 04:21:00
C# delegate std:ZNsIFace::ZIDelgtMSG . object
, interface .
.
ZIDelgtMSG interface , COM(Component Object Model)
. C++ COM .
-- 2009-03-01 12:04:00
,
object .
(, ,
.)
1) object polling ,
object , object
.
( polling) / lock .
2) , object ,
,
, . ,
.
object
key/value map .
CKeyValueMap_T<> CKeyValMapPrgs(Sync)_T<>
.
-- 2009-03-03 07:36:00
object ,
.
-- 2009-03-05 06:20:00
, .
, #include ,
#include
.
class CKeyValueMap_T< int,std::ZNsIFace::ZIDelgtMSG*,
int,std::ZNsIFace::ZIDelgtMSG*,
/////////////////// >
. object , /
#include . std::ZNsIFace::ZIDelgtMSG .
-- 2009-03-06 08:59:00
Modeless Modeless , Modeless
. Modeless
.
-- 2009-03-08 21:28:00
릿 릿 릿 , CStringEx.H std::__FastMoveObj() CStringBase_T<>
릿 .
-- 2009-09-06 07:26:00
OS
MainHead.H
MainHeadEx.H
CFileEx.H
CProcess.H
CNet.H
. .
.
. .
.
-
,
. .
, .
http://phpschool.com/gnuboard4/bbs/board.php?bo_table=talkbox&wr_id=1473843&page=1
-- 2009-04-28 09:16:00
릿 .
template<typename T> struct CShow
{
static void Show(){cout<<"## show : T="<<typeid(T).name()<<endl;}
template<typename T2> static void Show2(T2);
};
template<typename T> template<typename T2>
void CShow<T>::Show2(T2){cout<<"## show : T2="<<typeid(T2).name()<<endl;}
-- 2013-05-06
main .
echo %ERRORLEVEL%
,
echo $?
,
http://bcode.tistory.com/5
-- 2011-03-03 22:43:00
. (/ ' ' 167 page)
?
?
?
?
, ?
, Assertion ?
, ?
Exception ?
?
thread-safe ?
object thread-safe ?
Lock ?
?
, ?
?
?
API ?
, .
thread-safe ?
object thread-safe ?
Lock ?
?
class , object ?
, . .
Flow '' ?
-- 2011-04-16 15:39:00
DB ERD , ?
-- 2011-04-17 12:08:00
, typedef ,
?
-- 2011-05-09 21:10:00
.
overflow underflow .
-- 2011-05-19 09:14:00
vector , object ,
. object ( )
, .
-- 2013-06-08 15:25:00
, , .
-- 2013-06-09 18:34:00
. ''
, .
ABA , .
-- 2013-06-21 19:41:00
object , object
. , ' ' .
-- 2013-06-23 19:30:00
new[] delete[] . MainHead.H 2013-07-09 23:32:00 .
valgrind . .
-- 2013-07-09 23:44:00
new new[] . ZtCObjectNew<> CArray_T<> .
-- 2013-07-11 01:26:00
, , ,
.
MainSSL.H 2015-03-06 22:17:00 . https://www.openssl.org 의 데이타를 가져올 때, 응
BIO object , .
.
-- 2015-03-08 21:32:00
object , object , .
CCtrlAsyncSock.H "'코드C2'에 대한 주석" . -- 2015-03-22 17:01:00
object -1 , object , flow . object
, object object
. .
-- 2013-06-23 19:25:00
' ' , / object
, object .
-- 2013-06-23 19:34:00
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
#endif //__MAINHEADER_H__