From 48678083abef949ecfdefba4b69c83116c83c151 Mon Sep 17 00:00:00 2001 From: sauron Date: Thu, 25 Feb 2021 17:27:36 +0900 Subject: [PATCH] add test.cpp --- ZCppMain/ZMainHead.H | 64 ++++++++++++++++++++++++++-------------------------- ZCppMain/test.cpp | 10 ++++++++ 2 files changed, 42 insertions(+), 32 deletions(-) create mode 100644 ZCppMain/test.cpp diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index a8a2f29..7ea0a3f 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -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<::TypeData).name()<::TypeData).name()<::TypeData).name()<::TypeData).name()<::TypeData).name()<::TypeData).name()< - 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 - 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 - 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 - 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 - 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 - 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 TLong ABS(TLong AL_Value) */ template - 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 - 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(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(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(ApcChar, AI_Length); + return AToInt(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) { diff --git a/ZCppMain/test.cpp b/ZCppMain/test.cpp new file mode 100644 index 0000000..60feeef --- /dev/null +++ b/ZCppMain/test.cpp @@ -0,0 +1,10 @@ +#include "ZMainHead.H" + +using namespace std; + +int main() +{ + cout<<"C++ 's great start"<