ICU 4.8.1.1
4.8.1.1
|
C++ API: Common ICU base class UObject. More...
#include "unicode/utypes.h"
Go to the source code of this file.
Data Structures | |
class | UMemory |
UMemory is the common ICU base class. More... | |
class | UObject |
UObject is the common ICU "boilerplate" class. More... | |
Defines | |
#define | U_OVERRIDE_CXX_ALLOCATION 1 |
U_OVERRIDE_CXX_ALLOCATION - Define this to override operator new and delete in UMemory. | |
#define | U_HAVE_PLACEMENT_NEW 1 |
Define this to define the placement new and delete in UMemory for STL. | |
#define | U_HAVE_DEBUG_LOCATION_NEW 0 |
Define this to define the MFC debug version of the operator new. | |
#define | UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass) |
This is a simple macro to add ICU RTTI to an ICU object implementation. | |
#define | UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass) |
This macro adds ICU RTTI to an ICU abstract class implementation. | |
#define | UOBJECT_DEFINE_NO_RTTI_IMPLEMENTATION(myClass) UClassID myClass::getDynamicClassID() const { return NULL; } |
This is a simple macro to express that a class and its subclasses do not offer ICU's "poor man's RTTI". |
#define U_HAVE_DEBUG_LOCATION_NEW 0 |
#define U_HAVE_PLACEMENT_NEW 1 |
#define U_OVERRIDE_CXX_ALLOCATION 1 |
U_OVERRIDE_CXX_ALLOCATION - Define this to override operator new and delete in UMemory.
Enabled by default for ICU.
Enabling forces all allocation of ICU object types to use ICU's memory allocation. On Windows, this allows the ICU DLL to be used by applications that statically link the C Runtime library, meaning that the app and ICU will be using different heaps.
#define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION | ( | myClass | ) |
UClassID U_EXPORT2 myClass::getStaticClassID() { \ static char classID = 0; \ return (UClassID)&classID; \ }
This macro adds ICU RTTI to an ICU abstract class implementation.
This macro should be invoked in *.cpp files. The corresponding header should declare getStaticClassID.
myClass | The name of the class that needs RTTI defined. |
#define UOBJECT_DEFINE_NO_RTTI_IMPLEMENTATION | ( | myClass | ) | UClassID myClass::getDynamicClassID() const { return NULL; } |
This is a simple macro to express that a class and its subclasses do not offer ICU's "poor man's RTTI".
Beginning with ICU 4.6, ICU requires C++ compiler RTTI. This does not go into the header. This should only be used in *.cpp files. Use this with a private getDynamicClassID() in an immediate subclass of UObject.
myClass | The name of the class that needs RTTI defined. |
#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION | ( | myClass | ) |
UClassID U_EXPORT2 myClass::getStaticClassID() { \ static char classID = 0; \ return (UClassID)&classID; \ } \ UClassID myClass::getDynamicClassID() const \ { return myClass::getStaticClassID(); }
This is a simple macro to add ICU RTTI to an ICU object implementation.
This does not go into the header. This should only be used in *.cpp files.
myClass | The name of the class that needs RTTI defined. |