fw4spl
fwCore::util::LazyInstantiator< INSTANCE_TYPE, TAG > Class Template Reference

A base class for lazy instantiation, constructed on first demand. More...

#include <LazyInstantiator.hpp>

+ Inheritance diagram for fwCore::util::LazyInstantiator< INSTANCE_TYPE, TAG >:
+ Collaboration diagram for fwCore::util::LazyInstantiator< INSTANCE_TYPE, TAG >:

Public Types

typedef INSTANCE_TYPE InstanceType
 
typedef TAG TagType
 
typedef std::shared_ptr< InstanceType > InstanceSptrType
 

Static Public Member Functions

static InstanceSptrType getInstance ()
 Returns the singleton instance. This method is thread safe.
 

Static Protected Member Functions

static void initInstance ()
 Initializes the singleton instance.
 
static InstanceSptrType instance ()
 Initializes once and returns the instance (not thread-safe)
 

Detailed Description

template<typename INSTANCE_TYPE, typename TAG = LazyInstantiatorDefaultTag>
class fwCore::util::LazyInstantiator< INSTANCE_TYPE, TAG >

A base class for lazy instantiation, constructed on first demand.

Template Parameters
INSTANCE_TYPEType of object to instantiate.
TAGTag used to allow several LazyInstantiator for one INSTANCE_TYPE.

Definition at line 28 of file LazyInstantiator.hpp.


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