MachineIntelligenceCore:Toolchain
|
Application factory, class responsible for generation of an application object. Defined in the form of a singleton, with double-checked locking pattern (DCLP) based access to instance. More...
#include <ApplicationFactory.hpp>
Public Member Functions | |
virtual | ~ApplicationFactory () |
template<class AppType > | |
void | RegisterFactory () |
mic::application::Application * | create (std::string app_name_) |
![]() | |
virtual | ~FactoryInterface () |
Static Public Member Functions | |
static ApplicationFactory * | getInstance () |
Private Member Functions | |
ApplicationFactory () | |
Private Attributes | |
FactoryInterface * | internal_factory |
"Internal factory", responsible for returning of classes of different objects (applications). More... | |
Static Private Attributes | |
static boost::atomic < ApplicationFactory * > | instance_ |
static boost::mutex | instantiation_mutex |
Application factory, class responsible for generation of an application object. Defined in the form of a singleton, with double-checked locking pattern (DCLP) based access to instance.
Definition at line 90 of file ApplicationFactory.hpp.
|
virtual |
Destructor. Empty.
Definition at line 62 of file ApplicationFactory.cpp.
|
private |
Constructor. Sets internal factory pointer to null.
Definition at line 57 of file ApplicationFactory.cpp.
References internal_factory.
Referenced by getInstance().
|
inlinevirtual |
Method responsible for run time specified object creation - calls internal factory to do this job.
app_name_ | Name of the application. |
Implements mic::application::FactoryInterface.
Definition at line 120 of file ApplicationFactory.hpp.
References mic::application::FactoryInterface::create(), and internal_factory.
|
static |
Method for accessing the object instance, with double-checked locking optimization.
Definition at line 36 of file ApplicationFactory.cpp.
References ApplicationFactory(), instance_, and instantiation_mutex.
|
inline |
Template method responsible for registration of an "internal application factory".
AppType | Template parameter denoting the application type. |
Definition at line 108 of file ApplicationFactory.hpp.
References internal_factory.
|
staticprivate |
Private instance - accessed as atomic operation.
Definition at line 131 of file ApplicationFactory.hpp.
Referenced by getInstance().
|
staticprivate |
Mutex used for instantiation of the instance.
Definition at line 136 of file ApplicationFactory.hpp.
Referenced by getInstance().
|
private |
"Internal factory", responsible for returning of classes of different objects (applications).
Definition at line 145 of file ApplicationFactory.hpp.
Referenced by ApplicationFactory(), create(), and RegisterFactory().