Bull DPX/20 Uživatelská příručka Strana 365

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 424
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 364
Metaclass Framework Reference 4-7
SOMMSingleInstance Metaclass
Description
SOMMSingleInstance can be specified as the metaclass when a class implementor is
defining a class for which only one instance can ever be created. The first call to
<className>New in C, the new operator in C++, or the somNew method creates the one
possible instance of the class. Thereafter, any subsequent “new” calls return the first (and
only) instance.
Alternatively, the method sommGetSingleInstance can be used to accomplish the same
purpose. The method offers an advantage in that the call site explicitly shows that
something special is occurring and that a new object is not necessarily being created.
SOMMSingleInstance is thread-safe.
File Stem
snglicls
Base Class
SOMClass
Metaclass
SOMClass
Ancestor Classes
SOMClass
SOMObject
New Methods
sommGetSingleInstance
Overriding Methods
somInit
somNew
Zobrazit stránku 364
1 2 ... 360 361 362 363 364 365 366 367 368 369 370 ... 423 424

Komentáře k této Příručce

Žádné komentáře