18 #ifndef __etypes_h_included 19 #define __etypes_h_included 33 typedef unsigned char UChar;
35 typedef int16_t Short;
36 typedef uint16_t UShort;
38 typedef uint32_t UInt;
40 typedef uint32_t ULong;
42 typedef int64_t LongLong;
43 typedef uint64_t ULongLong;
45 typedef double Double;
48 typedef const Bool cBool;
49 typedef const Char cChar;
50 typedef const UChar cUChar;
51 typedef const Short cShort;
52 typedef const UShort cUShort;
53 typedef const Int cInt;
54 typedef const UInt cUInt;
55 typedef const Long cLong;
56 typedef const ULong cULong;
57 typedef const Dword cDword;
58 typedef const LongLong cLongLong;
59 typedef const ULongLong cULongLong;
60 typedef const Float cFloat;
61 typedef const Double cDouble;
68 typedef UChar *pUChar;
69 typedef Short *pShort;
70 typedef UShort *pUShort;
74 typedef ULong *pULong;
75 typedef Dword *pDword;
76 typedef LongLong *pLongLong;
77 typedef ULongLong *pULongLong;
78 typedef Float *pFloat;
79 typedef Double *pDouble;
82 typedef const pVoid cpVoid;
83 typedef const pBool cpBool;
84 typedef const Char *cpChar;
85 typedef const Char *cpStr;
86 typedef const UChar *cpUChar;
87 typedef const pShort cpShort;
88 typedef const pUShort cpUShort;
89 typedef const pInt cpInt;
90 typedef const pUInt cpUInt;
91 typedef const pLong cpLong;
92 typedef const pULong cpULong;
93 typedef const pDword cpDword;
94 typedef const pLongLong cpLongLong;
95 typedef const pULongLong cpULongLong;
96 typedef const pFloat cpFloat;
97 typedef const pDouble cpDouble;
117 #if __cplusplus == 201103 119 template<
typename T,
typename U=T>
120 T exchange(T& obj, U&& new_value)
122 T old_value(std::move(obj));
123 obj = std::forward<T>(new_value);
129 inline std::string methodName(
const std::string& prettyFunction)
131 size_t colons = prettyFunction.find(
"::");
132 size_t begin = prettyFunction.substr(0,colons).rfind(
" ") + 1;
133 size_t end = prettyFunction.rfind(
"(") - begin;
134 return prettyFunction.substr(begin,end) +
"()";
137 #define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__) 139 inline std::string className(
const std::string& prettyFunction)
141 size_t colons = prettyFunction.rfind(
"::");
142 if (colons == std::string::npos)
144 size_t begin = prettyFunction.substr(0,colons).rfind(
" ") + 1;
145 size_t end = colons - begin;
146 return prettyFunction.substr(begin,end);
149 #define __CLASS_NAME__ className(__PRETTY_FUNCTION__) 154 #endif // #define __etypes_h_included