★ wanayoo — archive 1999 http://corelinux.sourceforge.net/classref/Singleton.htmlNouvelle recherche | Portail wanayoo

template< class TypeImpl > class corelinux::Singleton: public CoreLinuxObject

Ensure a class only has one instance, and provide a global point of access to it.

Inheritance:


Public Methods

[more] Singleton( void ) throw( Assertion )
Default constructor sets theSingleton and theType after insuring that they are not already instantiated
[more] Singleton( TypeImpl *aTypePtr ) throw( Assertion )
Initializing constructor
[more]static TypeImpl* instance( void )
Returns the instance of the TypeImpl
[more]bool operator==( const Singleton & aSingleton ) const
Equality operator tests that theSingleton instances are equal
[more]virtual ~Singleton( void )
Virtual destructor


Inherited from CoreLinuxObject:

Public Methods

obool operator!=( CoreLinuxObjectCref ) const
oCoreLinuxObjectRef operator=( CoreLinuxObjectCref )


Documentation

Ensure a class only has one instance, and provide a global point of access to it. This is easier said than done outside of the solution domain. While we can declare a protocol by which the use of this type will prevent multiple applications, we can't insure that the implementor won't violate said protocol.
o Singleton( void ) throw( Assertion )
Default constructor sets theSingleton and theType after insuring that they are not already instantiated
Throws:
Assertion

o Singleton( TypeImpl *aTypePtr ) throw( Assertion )
Initializing constructor

ovirtual ~Singleton( void )
Virtual destructor

obool operator==( const Singleton & aSingleton ) const
Equality operator tests that theSingleton instances are equal
Returns:
bool true if equal
Parameters:
Singleton - const reference

ostatic TypeImpl* instance( void )
Returns the instance of the TypeImpl
Returns:
TypeImpl pointer


This class has no child classes.



This page was generated with the help of
DOC++.