SOMMSingleInstance
- File stem
- snglicls
- Base
- SOMClass
- Metaclass
- SOMClass
- Ancestor Classes SOMClass
- SOMObject
- Description
SOMMSingleInstance is a metaclass provided with the SOM Toolkit. It can be specified as the metaclass when 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. SOMMSingleInstance is thread safe.
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.
- New methods
The following list shows all the SOMMSingleInstance methods.
- sommGetSingleInstance
- Overridden methods
The following list shows all the methods overridden by the SOMMSingleInstance class. These methods are overridden in order to modify the behavior defined by an ancestor class.