add test.cpp

This commit is contained in:
2021-02-25 17:27:36 +09:00
parent e067b495dc
commit 48678083ab
2 changed files with 42 additions and 32 deletions

View File

@ -2233,11 +2233,11 @@ namespace ZNsMain
virtual ~ZIDelgtMSG(){}
virtual int GetTypeID() const
virtual ZTypIntI GetTypeID() const
{
return 0;
}/*
virtual int GetTypeID() const*/
virtual ZTypIntI GetTypeID() const*/
virtual const char* GetTypeName() const
{
@ -2251,17 +2251,17 @@ namespace ZNsMain
}/*
virtual int GetIMSGPtrOfID(int AI_TypeID, ZIDelgtMSG*R APR_ZIDelgtMSG)*/
virtual IntPtr SendMSG(ZIDelgtMSG& ArZIDelgtMSG, int AI_MsgNo, const char* ApcMsgData, int AI_MsgLen, void* AP_Void=0, ...)
virtual ZTypIntPtr SendMSG(ZIDelgtMSG& ArZIDelgtMSG, ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypIntI AI_MsgLen, void* AP_Void=0, ...)
{
return EIMSG_OK;
}/*
virtual IntPtr SendMSG(ZIDelgtMSG& ArZIDelgtMSG, int AI_MsgNo, const char* ApcMsgData, int AI_MsgLen,void* AP_Void=0, ...)*/
virtual IntPtr SendMSG(ZIDelgtMSG& ArZIDelgtMSG, ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypIntI AI_MsgLen,void* AP_Void=0, ...)*/
virtual IntPtr RecvMSG(int AI_MsgNo, const char* ApcMsgData, int AI_MsgLen, void* AP_Void=0, ...)
virtual ZTypIntPtr RecvMSG(ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypIntI AI_MsgLen, void* AP_Void=0, ...)
{
return EIMSG_OK;
}/*
virtual IntPtr RecvMSG(int AI_MsgNo, const char* ApcMsgData, int AI_MsgLen, void* AP_Void=0, ...)*/
virtual ZTypIntPtr RecvMSG(ZTypIntI AI_MsgNo, const char* ApcMsgData, ZTypIntI AI_MsgLen, void* AP_Void=0, ...)*/
public:
};/*
@ -2336,9 +2336,9 @@ namespace ZNsMain
cf)
cout<<typeid(std::ZtCTypeData<int >::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<int*>::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<int&>::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<ZTypIntI >::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<ZTypIntI*>::TypeData).name()<<endl;
cout<<typeid(std::ZtCTypeData<ZTypIntI&>::TypeData).name()<<endl;
-- 2010-01-15 00:11:00
@ -2423,7 +2423,7 @@ namespace ZNsMain
/*private:*/
public :
static int GetAbsMinOrder(TTypSize AI_One, TTypSize AI_Two, TTypSize AI_Three)
static ZTypIntI GetAbsMinOrder(TTypSize AI_One, TTypSize AI_Two, TTypSize AI_Three)
{
// 세 개의 인수 중에서 절대값이 최소가 되는 수는
// 몇 번째 인지 그 순서를 반환한다.
@ -2438,7 +2438,7 @@ namespace ZNsMain
(GetAbs(AI_Two)<=GetAbs(AI_Three) ? 2 : 3)
/****/ );
};/*
static int GetAbsMinOrder(TTypSize AI_One,TTypSize AI_Two, TTypSize AI_Three)*/
static ZTypIntI GetAbsMinOrder(TTypSize AI_One,TTypSize AI_Two, TTypSize AI_Three)*/
public:
};/*
@ -2449,14 +2449,14 @@ namespace ZNsMain
/*/////////////////////////////////////////////////
inline int GetLastError(){return ::GetLastError();}
inline ZTypIntI GetLastError(){return ::GetLastError();}
/////////////////////////////////////////////////*/
using ::GetLastError;
template<typename TString>
static bool GetLastErrMSG(TString& ARR_BuffCStr, int AI_ErrNo=0)
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0)
{
LPVOID VP_MsgBuff; DWORD ViErrNo=(AI_ErrNo==0 ? ::GetLastError() : AI_ErrNo);
@ -2478,19 +2478,19 @@ namespace ZNsMain
::LocalFree(VP_MsgBuff); return true;
}/*
template<typename TString>
static bool GetLastErrMSG(TString& ARR_BuffCStr, int AI_ErrNo=0) */
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0) */
// defined(_WIN)
#elif defined(__unix__)
inline int GetLastError()
inline ZTypIntI GetLastError()
{
return errno ; // ::error 로 하면 안된다.
}/*
inline int GetLastError()*/
inline ZTypIntI GetLastError()*/
template<typename TString>
static bool GetLastErrMSG(TString& ARR_BuffCStr, int AI_ErrNo=0)
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0)
{
if(AI_ErrNo==0)
ARR_BuffCStr = ::strerror(errno );
@ -2499,15 +2499,15 @@ namespace ZNsMain
return true; // for compatibility with window
}/*
template<typename TString>
static bool GetLastErrMSG(TString& ARR_BuffCStr, int AI_ErrNo=0) */
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0) */
//#elif defined(__unix__)
#else
inline int GetLastError(){return errno ;}
inline ZTypIntI GetLastError(){return errno ;}
template<typename TString>
static bool GetLastErrMSG(TString& ARR_BuffCStr, int AI_ErrNo=0)
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0)
{
if(AI_ErrNo==0)
ARR_BuffCStr = ::strerror(errno );
@ -2518,7 +2518,7 @@ namespace ZNsMain
return true; // for compatibility with window
}/*
template<typename TString>
static bool GetLastErrMSG(TString& ARR_BuffCStr, int AI_ErrNo=0) */
static bool GetLastErrMSG(TString& ARR_BuffCStr, ZTypIntI AI_ErrNo=0) */
#endif
@ -2532,7 +2532,7 @@ namespace ZNsMain
template<typename TLong> TLong ABS(TLong AL_Value) */
template<typename TypeInt>
TypeInt AToInt(const char* ApcChar, int AI_Length)
TypeInt AToInt(const char* ApcChar, ZTypIntI AI_Length)
{
if(AI_Length<1) return 0;
@ -2558,7 +2558,7 @@ namespace ZNsMain
return VL_Result;
}/*
template<typename TypeInt>
TypeInt AToInt(const char* ApcChar, int AI_Length) */
TypeInt AToInt(const char* ApcChar, ZTypIntI AI_Length) */
#ifdef _WIN
@ -2579,11 +2579,11 @@ namespace ZNsMain
#endif // !defined(_WIN)
inline LongLong ATOLL(const char* ApcChar, int AI_Length)
inline LongLong ATOLL(const char* ApcChar, ZTypIntI AI_Length)
{
return AToInt<LongLong>(ApcChar, AI_Length);
}/*
inline LongLong ATOL(const char* ApcChar, int AI_Length)*/
inline LongLong ATOL(const char* ApcChar, ZTypIntI AI_Length)*/
inline long ATOL(const char* ApcChar)
@ -2592,24 +2592,24 @@ namespace ZNsMain
}/*
inline long ATOL(const char* ApcChar)*/
inline long ATOL(const char* ApcChar, int AI_Length)
inline long ATOL(const char* ApcChar, ZTypIntI AI_Length)
{
return AToInt<long>(ApcChar, AI_Length);
}/*
inline long ATOL(const char* ApcChar, int AI_Length)*/
inline long ATOL(const char* ApcChar, ZTypIntI AI_Length)*/
inline int ATOI(const char* ApcChar)
inline ZTypIntI ATOI(const char* ApcChar)
{
if(ApcChar==0) return 0; return atoi(ApcChar);
}/*
inline int ATOI(const char* ApcChar)*/
inline ZTypIntI ATOI(const char* ApcChar)*/
inline int ATOI(const char* ApcChar, int AI_Length)
inline ZTypIntI ATOI(const char* ApcChar, ZTypIntI AI_Length)
{
return AToInt<int>(ApcChar, AI_Length);
return AToInt<ZTypIntI>(ApcChar, AI_Length);
}/*
inline int ATOI(const char* ApcChar, int AI_Length)*/
inline ZTypIntI ATOI(const char* ApcChar, ZTypIntI AI_Length)*/
inline double ATOD(const char* ApcChar)
{