SingletonManager Class Reference

#include <singleton.h>

Inheritance diagram for SingletonManager:
zmm::Object

Public Member Functions

 SingletonManager ()
void registerSingleton (zmm::Ref< Singleton< zmm::Object > > object)
virtual void shutdown (bool complete=false)
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static zmm::Ref< SingletonManagergetInstance ()
static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Attributes

zmm::Ref< zmm::ObjectStack
< Singleton< zmm::Object > > > 
singletonStack
mt_atomic_t _ref_count

Static Protected Attributes

static zmm::Ref< SingletonManagerinstance = nil
static zmm::Ref< Mutexmutex = Ref<Mutex>(new Mutex())

Detailed Description

Definition at line 42 of file singleton.h.


Constructor & Destructor Documentation

SingletonManager::SingletonManager (  ) 

Definition at line 57 of file singleton.cc.

References SINGLETON_CUR_MAX, and singletonStack.

Referenced by getInstance().


Member Function Documentation

Ref< SingletonManager > SingletonManager::getInstance (  )  [static]

Definition at line 43 of file singleton.cc.

References AUTOLOCK, instance, mutex, nil, and SingletonManager().

Referenced by main().

int Object::getRefCount (  )  [inherited]

Definition at line 78 of file object.cc.

References zmm::Object::_ref_count, and atomic_get().

void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file object.cc.

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file object.cc.

References MALLOC.

void SingletonManager::registerSingleton ( zmm::Ref< Singleton< zmm::Object > >  object  ) 

Definition at line 62 of file singleton.cc.

References AUTOLOCK, log_debug, mutex, print_backtrace, SINGLETON_CUR_MAX, and singletonStack.

void Object::release (  )  [inherited]
void Object::retain (  )  [inherited]
void SingletonManager::shutdown ( bool  complete = false  )  [virtual]

Definition at line 77 of file singleton.cc.

References AUTOLOCK, instance, log_debug, mutex, nil, SINGLETON_CUR_MAX, and singletonStack.


Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
Ref< SingletonManager > SingletonManager::instance = nil [static, protected]

Definition at line 52 of file singleton.h.

Referenced by getInstance(), and shutdown().

Ref< Mutex > SingletonManager::mutex = Ref<Mutex>(new Mutex()) [static, protected]

Reimplemented from zmm::Object.

Definition at line 53 of file singleton.h.

Referenced by getInstance(), registerSingleton(), and shutdown().

Definition at line 55 of file singleton.h.

Referenced by registerSingleton(), shutdown(), and SingletonManager().


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

Generated on Fri Mar 26 20:16:57 2010 for MediaTomb by  doxygen 1.6.1