ICU 76.1: icu::UObject Class Reference

ICU 76.1 76.1

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.
virtual UClassID | getDynamicClassID () const
| ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.

## 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 (which itself is a subclass of UObject).

Stable
  ICU 2.2

Definition at line 223 of file uobject.h.

## Constructor & Destructor Documentation

## ◆ ~UObject()

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

Destructor.

Stable
  ICU 2.2

## Member Function Documentation

## ◆ getDynamicClassID()

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

References icu::operator==().

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

- common/unicode/uobject.h