Protium
Math and Design Features
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Protium::Singleton Namespace Reference

Classes

struct  Adapter
 Deletion Adapter class. More...
 
class  ConcreteDeletionTracker
 
struct  CreateAlloc
 
struct  CreateMalloc
 Helper struct to create instances with malloc, and deallocate with free. More...
 
struct  CreateNew
 
struct  CreateStatic
 Helper struct to create static instances of classes. More...
 
class  DeleteComposite
 
struct  DeleteFirst
 
struct  DeleteLast
 
struct  DeleteNever
 
struct  DeleteNextToLast
 
struct  DeleteOnce
 
struct  Deleter
 
class  DeleteRandom
 
class  DeleteTwice
 
class  DeleteWithFixedPriority
 
class  DeleteWithPriority
 
class  DeletionTracker
 Abstract class to hold priority for deletion. More...
 
class  Singleton
 

Typedefs

typedef void(* exit_function_pointer_type )()
 Defines the type of functions to be called at exit. More...
 

Functions

void AtExitFn ()
 Gets added to the std::atexit queue every time a singleton get created. Called once for every singleton at end of execution. Deletes singletons in order. More...
 
template<typename Host , typename Destroyer >
void SetPriority (Host *pDynObject, unsigned int priority, Destroyer d)
 Helper function for putting an object into the deletion queue. More...
 
template<typename Host >
void SetPriority (Host *pDynObject, unsigned int priority, typename Deleter< Host >::Type d=Deleter< Host >::Delete)
 Helper function for setting singleton deletion priority. More...
 

Detailed Description

Contains all helper objects for creating threadsafe singletons with longevity tracking

Typedef Documentation

typedef void(* Protium::Singleton::exit_function_pointer_type)()

Defines the type of functions to be called at exit.

Definition at line 14 of file DeletionPolicies.h.

Function Documentation

void Protium::Singleton::AtExitFn ( )

Gets added to the std::atexit queue every time a singleton get created. Called once for every singleton at end of execution. Deletes singletons in order.

A function that.

Definition at line 7 of file DeletionPolicies.cxx.

template<typename Host , typename Destroyer >
void Protium::Singleton::SetPriority ( Host *  pDynObject,
unsigned int  priority,
Destroyer  d 
)

Helper function for putting an object into the deletion queue.

Definition at line 92 of file DeletionPolicies.h.

template<typename Host >
void Protium::Singleton::SetPriority ( Host *  pDynObject,
unsigned int  priority,
typename Deleter< Host >::Type  d = Deleter< Host >::Delete 
)

Helper function for setting singleton deletion priority.

Definition at line 101 of file DeletionPolicies.h.