ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Macros
uobject.h File Reference

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...
 

Macros

#define U_OVERRIDE_CXX_ALLOCATION   1
 U_OVERRIDE_CXX_ALLOCATION - Define this to override operator new and delete in UMemory. More...
 
#define U_HAVE_PLACEMENT_NEW   1
 Define this to define the placement new and delete in UMemory for STL. More...
 
#define U_HAVE_DEBUG_LOCATION_NEW   0
 Define this to define the MFC debug version of the operator new. More...
 
#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass)
 This is a simple macro to add ICU RTTI to an ICU object implementation. More...
 
#define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass)
 This macro adds ICU RTTI to an ICU abstract class implementation. More...
 

Detailed Description

C++ API: Common ICU base class UObject.

Definition in file uobject.h.

Macro Definition Documentation

#define U_HAVE_DEBUG_LOCATION_NEW   0

Define this to define the MFC debug version of the operator new.

Stable:
ICU 3.4

Definition at line 63 of file uobject.h.

#define U_HAVE_PLACEMENT_NEW   1

Define this to define the placement new and delete in UMemory for STL.

Stable:
ICU 2.6

Definition at line 51 of file uobject.h.

#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.
Stable:
ICU 2.2

Definition at line 40 of file uobject.h.

#define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION (   myClass)
Value:
UClassID U_EXPORT2 myClass::getStaticClassID() { \
static char classID = 0; \
return (UClassID)&classID; \
}
#define U_EXPORT2
Definition: platform.h:338
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
Definition: utypes.h:339

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.

Parameters
myClassThe name of the class that needs RTTI defined.
Internal:
Do not use. This API is for internal use only.

Definition at line 311 of file uobject.h.

#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION (   myClass)
Value:
UClassID U_EXPORT2 myClass::getStaticClassID() { \
static char classID = 0; \
return (UClassID)&classID; \
} \
UClassID myClass::getDynamicClassID() const \
{ return myClass::getStaticClassID(); }
#define U_EXPORT2
Definition: platform.h:338
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
Definition: utypes.h:339

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.

Parameters
myClassThe name of the class that needs RTTI defined.
Internal:
Do not use. This API is for internal use only.

Definition at line 294 of file uobject.h.