39 #ifndef U_OVERRIDE_CXX_ALLOCATION
40 #define U_OVERRIDE_CXX_ALLOCATION 1
50 #ifndef U_HAVE_PLACEMENT_NEW
51 #define U_HAVE_PLACEMENT_NEW 1
62 #ifndef U_HAVE_DEBUG_LOCATION_NEW
63 #define U_HAVE_DEBUG_LOCATION_NEW 0
80 #define U_NO_THROW throw()
102 #ifdef SHAPER_MEMORY_DEBUG
103 static void * NewArray(
int size,
int count);
104 static void * GrowArray(
void * array,
int newSize );
105 static void FreeArray(
void * array );
108 #if U_OVERRIDE_CXX_ALLOCATION
117 static void *
U_EXPORT2 operator new(
size_t size) U_NO_THROW;
124 static void *
U_EXPORT2 operator new[](
size_t size) U_NO_THROW;
134 static void U_EXPORT2 operator delete(
void *p) U_NO_THROW;
141 static void U_EXPORT2 operator delete[](
void *p) U_NO_THROW;
143 #if U_HAVE_PLACEMENT_NEW
149 static inline void *
U_EXPORT2 operator new(size_t,
void *ptr) U_NO_THROW {
return ptr; }
156 static inline void U_EXPORT2 operator delete(
void *,
void *) U_NO_THROW {}
158 #if U_HAVE_DEBUG_LOCATION_NEW
166 static void *
U_EXPORT2 operator new(
size_t size,
const char* file,
int line) U_NO_THROW;
174 static void U_EXPORT2 operator delete(
void* p,
const char* file,
int line) U_NO_THROW;
226 virtual UClassID getDynamicClassID()
const = 0;
252 virtual inline UBool operator==(
const UObject &other)
const {
return this==&other; }
253 inline UBool operator!=(
const UObject &other)
const {
return !operator==(other); }
294 #define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass) \
295 UClassID U_EXPORT2 myClass::getStaticClassID() { \
296 static char classID = 0; \
297 return (UClassID)&classID; \
299 UClassID myClass::getDynamicClassID() const \
300 { return myClass::getStaticClassID(); }
311 #define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass) \
312 UClassID U_EXPORT2 myClass::getStaticClassID() { \
313 static char classID = 0; \
314 return (UClassID)&classID; \
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
UMemory is the common ICU base class.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API If the compiler doesn't support namespaces...
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
int8_t UBool
The ICU boolean type.