SourcePro C++ 13.0 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
Ensures that a class has only one instance and provides a global point of access to it. More...
#include <rw/pointer/RWTSingleton.h>
Static Public Member Functions | |
static RWTCountingPointer< T, RWAtomicCounter > & | instance () |
Protected Member Functions | |
RWTSingleton () | |
Static Protected Member Functions | |
static RWTCountingPointer< T, RWAtomicCounter > & | get () |
RWTSingleton ensures that a class has only one instance, and provides a global point of access to it. This is an Object Creational pattern. For more information, see Design Patterns by Gamma, Helm, Johnson, and Vlissides.
|
inlineprotected |
The constructor is protected to ensure that only one instance can ever get created.
|
inlinestaticprotected |
Protected accessor function that gives access to the class state. Inherited classes use this function.
|
inlinestatic |
Creates and returns the instance of T
, if it has not already been created.
Copyright © 2014 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.