ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions
icu::UObject Class Reference

UObject is the common ICU "boilerplate" class. More...

`#include <uobject.h>`

Inheritance diagram for icu::UObject:

## Public Member Functions
virtual | ~UObject ()
| Destructor. More...
virtual UClassID | getDynamicClassID () const
| ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More...

## Detailed Description

UObject is the common ICU "boilerplate" class.

UObject inherits UMemory (starting with ICU 2.4), and all other public ICU C++ classes are derived from UObject (starting with ICU 2.2).

UObject contains common virtual functions, in particular a virtual destructor.

The clone() function is not available in UObject because it is not implemented by all ICU classes. Many ICU services provide a clone() function for their class trees, defined on the service's C++ base class, and all subclasses within that service class tree return a pointer to the service base class (which itself is a subclass of UObject). This is because some compilers do not support covariant (same-as-this) return types; cast to the appropriate subclass if necessary.

Stable:
  ICU 2.2

Definition at line 223 of file uobject.h.

## Constructor & Destructor Documentation

virtual icu::UObject::~UObject | ( |  | ) |
| virtual

Destructor.

Stable:
  ICU 2.2

## Member Function Documentation

virtual UClassID icu::UObject::getDynamicClassID | ( |  | ) | const
| virtual

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

The base class implementation returns a dummy value.

Use compiler RTTI rather than ICU's "poor man's RTTI". Since ICU 4.6, new ICU C++ class hierarchies do not implement "poor man's RTTI".

Stable:
  ICU 2.2

Reimplemented in icu::UnicodeString, icu::DecimalFormat, icu::RegexMatcher, icu::UnicodeSet, icu::Calendar, icu::Transliterator, icu::SimpleDateFormat, icu::RuleBasedNumberFormat, icu::NumberFormat, icu::Collator, icu::MessageFormat, icu::TimeArrayTimeZoneRule, icu::TimeZone, icu::SimpleTimeZone, icu::Normalizer, icu::Locale, icu::TimeZoneFormat, icu::ValueRuns, icu::DateFormatSymbols, icu::AnnualTimeZoneRule, icu::Formattable, icu::RegexPattern, icu::DateIntervalFormat, icu::ParagraphLayout, icu::RuleBasedBreakIterator, icu::PluralFormat, icu::PluralRules, icu::LocaleRuns, icu::ResourceBundle, icu::DateTimePatternGenerator, icu::GregorianCalendar, icu::ChoiceFormat, icu::VTimeZone, icu::RuleBasedCollator, icu::StringSearch, icu::CompactDecimalFormat, icu::UCharCharacterIterator, icu::InitialTimeZoneRule, icu::FontRuns, icu::RuleBasedTimeZone, icu::DecimalFormatSymbols, icu::SelectFormat, icu::ParagraphLayout::VisualRun, icu::DateIntervalInfo, icu::CollationElementIterator, icu::MeasureFormat, icu::DateTimeRule, icu::UnicodeSetIterator, icu::CollationKey, icu::FieldPosition, icu::TimeUnitFormat, icu::TimeZoneTransition, icu::CurrencyPluralInfo, icu::NumberingSystem, icu::MeasureUnit, icu::ParsePosition, icu::RunArray, icu::ParagraphLayout::Line, icu::StringCharacterIterator, icu::CanonicalIterator, icu::BreakIterator, icu::ForwardCharacterIterator, icu::TimeUnitAmount, icu::Measure, icu::UnicodeFunctor, icu::CurrencyUnit, icu::CurrencyAmount, icu::TimeUnit, icu::DateInterval, and icu::NoUnit.

Referenced by icu::MessageFormat::getApostropheMode(), icu::MeasureUnit::operator!=(), icu::BreakIterator::operator!=(), icu::RegexPattern::operator!=(), icu::DecimalFormatSymbols::operator!=(), icu::Calendar::operator!=(), icu::PluralRules::operator!=(), icu::Formattable::operator[](), icu::ParsePosition::ParsePosition(), icu::FieldPosition::setEndIndex(), and icu::UnicodeString::UnicodeString().

The documentation for this class was generated from the following file:

- uobject.h