Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

UObject Class Reference

UObject is the common ICU base class. More...

#include <uobject.h>

Inheritance diagram for UObject::

BiDi BreakIterator Calendar CollationElementIterator CollationKey Collator DateFormatSymbols DecimalFormatSymbols FieldPosition Format Formattable ForwardCharacterIterator ICULayoutEngine LayoutEngine Locale Normalizer ParsePosition Replaceable ResourceBundle SearchIterator TimeZone Transliterator UCharReference UnicodeConverter UnicodeFunctor UnicodeSetIterator List of all members.

Public Methods

virtual ~UObject ()
 Destructor. More...

void * operator new (size_t size)
 Overrides for ICU4C C++ memory management. More...

void * operator new[] (size_t size)
void operator delete (void *p)
 Overrides for ICU4C C++ memory management. More...

void operator delete[] (void *p)
virtual UClassID getDynamicClassID () const=0
 ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More...


Detailed Description

UObject is the common ICU base class.

All other ICU C++ classes are derived from UObject (starting with ICU 2.2).

This is primarily to make it possible and simple to override the C++ memory management by adding new/delete operators to this base class.

To override ALL ICU memory management, including that from plain C code, replace the allocation functions declared in cmemory.h

UObject does not contain default implementations of virtual methods like getDynamicClassID to allow derived classes such as Format to declare these as pure virtual.

It is likely that a future ICU release will split UObject to separate out a new "more base" class for only the memory management customization, with UObject subclassing that new class and adding virtual methods for "boilerplate" functions. This will simplify the maintenance of ICU.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Definition at line 63 of file uobject.h.


Constructor & Destructor Documentation

virtual UObject::~UObject   [inline, virtual]
 

Destructor.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Definition at line 70 of file uobject.h.


Member Function Documentation

virtual UClassID UObject::getDynamicClassID void    const [inline, pure virtual]
 

ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented in BiDi, BreakIterator, Calendar, ForwardCharacterIterator, ChoiceFormat, CollationElementIterator, Collator, UnicodeConverter, CompoundTransliterator, DictionaryBasedBreakIterator, DecimalFormatSymbols, DecimalFormat, DateFormatSymbols, FieldPosition, Formattable, Format, GregorianCalendar, HexToUnicodeTransliterator, Locale, ICULayoutEngine, MessageFormat, Normalizer, NullTransliterator, NumberFormat, ParsePosition, RuleBasedBreakIterator, RuleBasedNumberFormat, RuleBasedTransliterator, ResourceBundle, StringCharacterIterator, SimpleTimeZone, SimpleDateFormat, CollationKey, StringSearch, RuleBasedCollator, TimeZone, Transliterator, UCharCharacterIterator, UnicodeFilter, UnicodeFunctor, UnicodeSet, UnicodeString, UCharReference, UnicodeToHexTransliterator, UnicodeSetIterator, ArabicOpenTypeLayoutEngine, GXLayoutEngine, IndicOpenTypeLayoutEngine, LayoutEngine, OpenTypeLayoutEngine, and ThaiLayoutEngine.

void UObject::operator delete void *    p
 

Overrides for ICU4C C++ memory management.

simple, non-class types are allocated using the macros in common/cmemory.h (uprv_malloc(), uprv_free(), uprv_realloc()); they or something else could be used here to implement C++ new/delete for ICU4C C++ classes

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

void UObject::operator delete[] void *    p
 

void* UObject::operator new size_t    size
 

Overrides for ICU4C C++ memory management.

simple, non-class types are allocated using the macros in common/cmemory.h (uprv_malloc(), uprv_free(), uprv_realloc()); they or something else could be used here to implement C++ new/delete for ICU4C C++ classes

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

void* UObject::operator new[] size_t    size
 


The documentation for this class was generated from the following file:
Generated on Thu Aug 15 14:14:20 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001