ParCompMark::Singleton< T > Class Template Reference

#include <PCMSingleton.h>

Inheritance diagram for ParCompMark::Singleton< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename T>
class ParCompMark::Singleton< T >

Template class for creating single-instance global classes.

Definition at line 45 of file PCMSingleton.h.


Public Member Functions

template<>
ApplicationmInstance
template<>
ClustermInstance
template<>
FileSystemManagermInstance
template<>
HostmInstance
template<>
LoggermInstance
template<>
PluginManagermInstance
Constructors & destructor
 Singleton ()
 Default constructor.
virtual ~Singleton ()
 The destructor.

Static Public Member Functions

Class methods
static T * getInstance ()
 Gets the instance of the singleton class.
static void createInstance ()
 Create singleton instance.
static void destroyInstance ()
 Destroy singleton instance.

Static Protected Attributes

Class variables
static T * mInstance
 Class level instance.

Constructor & Destructor Documentation

template<typename T>
ParCompMark::Singleton< T >::Singleton (  ) 

Default constructor.

Definition at line 158 of file PCMSingleton.h.

template<typename T>
ParCompMark::Singleton< T >::~Singleton (  )  [virtual]

The destructor.

This class has virtual destructor.

Definition at line 167 of file PCMSingleton.h.


Member Function Documentation

template<typename T>
void ParCompMark::Singleton< T >::createInstance (  )  [inline, static]

template<typename T>
void ParCompMark::Singleton< T >::destroyInstance (  )  [inline, static]

template<typename T>
T * ParCompMark::Singleton< T >::getInstance (  )  [inline, static]

Gets the instance of the singleton class.

You have to construct singleton object (createInstance) before calling this method.

Returns:
Instance of the class

Reimplemented in ParCompMark::Application, ParCompMark::FileSystemManager, and ParCompMark::Host.

Definition at line 180 of file PCMSingleton.h.

Referenced by ParCompMark::PluginManager::_checkNeededLibs(), ParCompMark::Application::_compileDynamic(), ParCompMark::Plugin::_getErrorMsg(), ParCompMark::Plugin::_getNeededLibs(), ParCompMark::RendererPlugin::_getNeededOpenGLExts(), ParCompMark::RendererPlugin::_initFastFunctions(), ParCompMark::PluginManager::_loadPlugin(), ParCompMark::Plugin::_loggerFunction(), ParCompMark::Plugin::_onLoad(), ParCompMark::Plugin::_onUnload(), ParCompMark::RendererPlugin::_setBufferGetter(), ParCompMark::Plugin::_setLoggerFunction(), ParCompMark::Plugin::_setPluginHandle(), ParCompMark::Application::Application(), ParCompMark::Buffer::Buffer(), ParCompMark::NetServer::buildCluster(), ParCompMark::Application::commanderOperation(), ParCompMark::SqVM::compileAndExecuteScript(), ParCompMark::ConfigOptions::ConfigOptions(), ParCompMark::Context::Context(), ParCompMark::OpenGLRenderingEngine::createCustomRenderer(), ParCompMark::FileSystemManager::createDirectory(), ParCompMark::RendererPlugin::createRenderer(), ParCompMark::GLXRenderWindow::createWindow(), ParCompMark::RendererPlugin::destroyRenderer(), ParCompMark::GLXRenderWindow::destroyWindow(), ParCompMark::Thread::entryPoint(), ParCompMark::XDisplay::finalize(), ParCompMark::SqVM::finalize(), ParCompMark::Renderer::finalize(), ParCompMark::PluginManager::finalize(), ParCompMark::Plugin::finalize(), ParCompMark::Node::finalize(), ParCompMark::Host::finalize(), ParCompMark::GLXGLContext::finalize(), ParCompMark::FileSystemManager::finalize(), ParCompMark::Context::finalize(), ParCompMark::ConfigOptions::finalize(), ParCompMark::Buffer::finalize(), ParCompMark::Application::finalize(), ParCompMark::XDisplay::findBestVisual(), ParCompMark::Application::getHostListForSquirrel(), ParCompMark::GLXGLContext::GLXGLContext(), ParCompMark::Client::handleMessage(), ParCompMark::Host::Host(), ParCompMark::XDisplay::initialize(), ParCompMark::SqVM::initialize(), ParCompMark::Renderer::initialize(), ParCompMark::PluginManager::initialize(), ParCompMark::Plugin::initialize(), ParCompMark::Node::initialize(), ParCompMark::NetServer::initialize(), ParCompMark::NetClient::initialize(), ParCompMark::Host::initialize(), ParCompMark::GLXGLContext::initialize(), ParCompMark::Context::initialize(), ParCompMark::ConfigOptions::initialize(), ParCompMark::Buffer::initialize(), ParCompMark::Application::initialize(), ParCompMark::XDisplay::initializeMT(), ParCompMark::Process::initProcess(), ParCompMark::Application::interruptHandler(), ParCompMark::DynLoad::load(), ParCompMark::ConfigOptions::loadFromIniFile(), ParCompMark::PluginManager::loadPlugins(), ParCompMark::PluginManager::loadPlugins_old(), ParCompMark::Network::Network(), ParCompMark::Node::Node(), ParCompMark::Client::openConnection(), ParCompMark::OpenGLRenderingEngine::OpenGLRenderingEngine(), ParCompMark::Process::openRenderWindow(), ParCompMark::Host::openXDisplay(), ParCompMark::Plugin::Plugin(), ParCompMark::PluginManager::PluginManager(), ParCompMark::SqVM::printFunction(), ParCompMark::Process::Process(), ParCompMark::Client::recieveMessage(), ParCompMark::Renderer::Renderer(), ParCompMark::ConfigOptions::saveToIniFile(), ParCompMark::NetServer::sendBroadcastMessage(), ParCompMark::Client::sendMessage(), ParCompMark::ConfigOptions::setBool(), ParCompMark::Application::setFromConfigOptions(), ParCompMark::ConfigOptions::setInteger(), ParCompMark::ConfigOptions::setReal(), ParCompMark::ConfigOptions::setString(), ParCompMark::Thread::shutDownThread(), ParCompMark::Application::soldierOperation(), ParCompMark::SqVM::SqVM(), ParCompMark::Host::start(), ParCompMark::Application::startOperation(), ParCompMark::Thread::startThread(), ParCompMark::Host::stop(), ParCompMark::Thread::stopThread(), ParCompMark::NetServer::task(), ParCompMark::Application::terminateHandler(), ParCompMark::Process::threadFinalize(), ParCompMark::Process::threadInitialize(), ParCompMark::DynLoad::unload(), ParCompMark::PluginManager::unloadPlugins(), ParCompMark::Application::writeOutput(), ParCompMark::XDisplay::XDisplay(), ParCompMark::Buffer::~Buffer(), ParCompMark::ConfigOptions::~ConfigOptions(), ParCompMark::Context::~Context(), ParCompMark::FileSystemManager::~FileSystemManager(), ParCompMark::GLXGLContext::~GLXGLContext(), ParCompMark::Host::~Host(), ParCompMark::Node::~Node(), ParCompMark::OpenGLRenderingEngine::~OpenGLRenderingEngine(), ParCompMark::Plugin::~Plugin(), ParCompMark::PluginManager::~PluginManager(), ParCompMark::Process::~Process(), ParCompMark::Renderer::~Renderer(), ParCompMark::SqVM::~SqVM(), ParCompMark::Thread::~Thread(), and ParCompMark::XDisplay::~XDisplay().

Definition at line 48 of file PCMPluginManager.cpp.

template<>
Logger * ParCompMark::Singleton< Logger >::mInstance (  ) 

Definition at line 39 of file PCMLogger.cpp.

template<>
Host * ParCompMark::Singleton< Host >::mInstance (  ) 

Definition at line 39 of file PCMHost.cpp.

template<>
Cluster * ParCompMark::Singleton< Cluster >::mInstance (  ) 

Definition at line 36 of file PCMCluster.cpp.

Definition at line 45 of file PCMApplication.cpp.


Member Data Documentation

template<typename T>
T * ParCompMark::Singleton< T >::mInstance [static, protected]

Class level instance.

Remarks:
This is own attribute of this class.

Definition at line 69 of file PCMSingleton.h.


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