SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
sutil::CRegisteredCallbacks< Idx > Class Template Reference

#include <CRegisteredCallbacks.hpp>

Inheritance diagram for sutil::CRegisteredCallbacks< Idx >:
Inheritance graph
[legend]
Collaboration diagram for sutil::CRegisteredCallbacks< Idx >:
Collaboration graph
[legend]

Static Public Member Functions

static bool callbackRegistered (const Idx &arg_callback_name)
 
static bool resetCallbacks ()
 
static CMappedPointerList< Idx,
CCallbackSuperBase< Idx >
, true > * 
getCallbacks ()
 

Private Types

typedef CSingleton
< CMappedPointerList< Idx,
CCallbackSuperBase< Idx >
, true > > 
singleton
 

Private Member Functions

 CRegisteredCallbacks ()
 
 CRegisteredCallbacks (const CRegisteredCallbacks &)
 
CRegisteredCallbacksoperator= (const CRegisteredCallbacks &)
 

Static Private Member Functions

static bool registerCallback (const Idx &arg_callback_name, CCallbackSuperBase< Idx > *arg_callback_object)
 
static CMappedPointerList< Idx,
CCallbackSuperBase< Idx >
, true > * 
getData ()
 
static bool resetData ()
 

Private Attributes

CMappedPointerList< Idx,
CCallbackSuperBase< Idx >
, true > 
data_
 

Static Private Attributes

static CSingletonsingleton_
 

Friends

class CCallbackSuperBase< Idx >
 

Detailed Description

template<typename Idx>
class sutil::CRegisteredCallbacks< Idx >

This class implements a callback factory singleton. In plain English, it is a one-of-a-kind class that can give you an function based on its name.

NOTE: The singleton manages its memory and deletes all the pointers.

Constructor & Destructor Documentation

template<typename Idx >
sutil::CRegisteredCallbacks< Idx >::CRegisteredCallbacks ( )
private

Private for the singleton

template<typename Idx >
sutil::CRegisteredCallbacks< Idx >::CRegisteredCallbacks ( const CRegisteredCallbacks< Idx > &  )
private

Private for the singleton

Member Function Documentation

template<typename Idx >
static bool sutil::CRegisteredCallbacks< Idx >::callbackRegistered ( const Idx &  arg_callback_name)
inlinestatic

Checks whether this callback has been registered with the factory

template<typename Idx >
static CMappedPointerList<Idx,CCallbackSuperBase<Idx>,true>* sutil::CRegisteredCallbacks< Idx >::getCallbacks ( )
inlinestatic

Used to access the callback list

static CMappedPointerList< Idx, CCallbackSuperBase< Idx >, true > * sutil::CSingleton< CMappedPointerList< Idx, CCallbackSuperBase< Idx >, true > >::getData ( )
staticinherited

Creates a singleton if necessary and returns it.

Returns a pointer instead of a reference to support a 0 return when there is an error

template<typename Idx >
CRegisteredCallbacks& sutil::CRegisteredCallbacks< Idx >::operator= ( const CRegisteredCallbacks< Idx > &  )
private

Private for the singleton

template<typename Idx >
static bool sutil::CRegisteredCallbacks< Idx >::registerCallback ( const Idx &  arg_callback_name,
CCallbackSuperBase< Idx > *  arg_callback_object 
)
inlinestaticprivate

This function registers new dynamic callbacks with the factory. You can get objects of this callback by calling the createObjectForCallback function

template<typename Idx >
static bool sutil::CRegisteredCallbacks< Idx >::resetCallbacks ( )
inlinestatic

Deletes the singleton object and creates a new one in its stead

static bool sutil::CSingleton< CMappedPointerList< Idx, CCallbackSuperBase< Idx >, true > >::resetData ( )
staticinherited

Deletes the singleton instance and creates a new one.

Member Data Documentation

CMappedPointerList< Idx, CCallbackSuperBase< Idx >, true > sutil::CSingleton< CMappedPointerList< Idx, CCallbackSuperBase< Idx >, true > >::data_
protectedinherited

Shared Memory: The publicly available data that will be shared across the different subsystems

CSingleton* sutil::CSingleton< CMappedPointerList< Idx, CCallbackSuperBase< Idx >, true > >::singleton_
staticprotectedinherited

The singleton instance

This initializes the pointer to null


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