C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CORE_ClassFactory Class Reference

this class describes a class factory to generate classes More...

#include <CORE_ClassFactory.h>

Inheritance diagram for CORE_ClassFactory:
Inheritance graph
[legend]
Collaboration diagram for CORE_ClassFactory:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const override
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual tMemSize getContentsMemorySize () const override
 return the memory size in byte More...
 
void addClassFactory (CORE_UniquePointer< CORE_ClassFactory > child)
 add to class factory More...
 
void clearClassFactories ()
 clear the class factories list
 
virtual CORE_UniquePointer< CORE_ObjectNewInstance (const tString &name, const CORE_OptionsList &arguments) const
 create an unique instance of a class as a general CORE_Object More...
 
CORE_UniquePointer< CORE_ObjectNewInstance (const tString &name) const
 create an unique instance of a class as a general CORE_Object More...
 
template<class T >
CORE_UniquePointer< T > NewInstance (const tString &name, const CORE_OptionsList &arguments) const
 create an unique instance of a class T More...
 
template<class T >
CORE_UniquePointer< T > NewInstance (const tString &name) const
 create an unique instance of a class T with no arguments More...
 
template<class T >
CORE_SharedPointer< T > NewSharedPointer (const tString &name, const CORE_OptionsList &arguments) const
 create a shared instance of a class More...
 
template<class T >
CORE_SharedPointer< T > NewSharedPointer (const tString &name) const
 create a shared instance of a class with no argument More...
 
template<class T >
CORE_SharedPointer< T > NewSharedPointer () const
 create a shared instance of a class with same type as T with no argument More...
 
template<class T >
CORE_SharedPointer< T > NewSharedPointer (const CORE_OptionsList &arguments) const
 create a shared instance of a class with same type as T More...
 
virtual tString toString () const override
 get the string representation of the class More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 

Static Public Member Functions

static CORE_UniquePointer< CORE_ClassFactoryNew ()
 build a new instance of default class factory More...
 
template<class T >
static CORE_SharedPointer< T > NewSharedPointer (CORE_UniquePointer< T > &up)
 create a shared instance of an unique pointer More...
 
template<class T >
static CORE_SharedPointer< T > NewSharedPointer (CORE_UniquePointer< T > &&up)
 create a shared instance of an unique pointer as a lvalue More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Protected Member Functions

 CORE_ClassFactory ()
 build a CORE_ClassFactory
 
virtual ~CORE_ClassFactory (void)
 destroy a CORE_ClassFactory
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

this class describes a class factory to generate classes

Member Function Documentation

◆ addClassFactory()

void CORE_ClassFactory::addClassFactory ( CORE_UniquePointer< CORE_ClassFactory child)
inline

add to class factory

Parameters
[in]childthe class factory to add

◆ getContentsMemorySize()

virtual tMemSize CORE_ClassFactory::getContentsMemorySize ( ) const
inlineoverridevirtual

return the memory size in byte

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

Reimplemented from CORE_Object.

◆ getMemorySize()

virtual tMemSize CORE_ClassFactory::getMemorySize ( ) const
inlineoverridevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from CORE_Object.

Reimplemented in SM_StochasticFunctionsClassFactory, SMOMPI_OperatorsClassFactory, SMOMPI_OperatorFieldsClassFactory, SM_NetworkClassFactory, SMOMPI_NetworkClassFactory, SM_MonteCarloClassFactory, SM_StochasticOutputClassFactory, SM_CycleClassFactory, SM_NoiseRateFunctionsClassFactory, SMOMPI_LandauLifschitzClassFactory, SM_CrystalStructureClassFactory, SM_ClassFactory, OMP_ClassFactory, MPI_ClassFactory, SMOMPI_ClassFactory, TRNG_ClassFactory, RNDSTD_ClassFactory, RAND_ClassFactory, and RNDB_ClassFactory.

◆ New()

static CORE_UniquePointer<CORE_ClassFactory> CORE_ClassFactory::New ( )
inlinestatic

build a new instance of default class factory

Returns
an unique pointer of CORE_ClassFactory

◆ NewInstance() [1/4]

CORE_UniquePointer<CORE_Object> CORE_ClassFactory::NewInstance ( const tString &  name) const
inline

create an unique instance of a class as a general CORE_Object

Parameters
[in]namename of the class to create
Returns
an unique pointer to the class with name return null if the name is not recognized

◆ NewInstance() [2/4]

template<class T >
CORE_UniquePointer<T> CORE_ClassFactory::NewInstance ( const tString &  name) const
inline

create an unique instance of a class T with no arguments

Parameters
[in]namename of the class to create
Returns
an unique pointer to the class with name return null if the name is not recognized

◆ NewInstance() [3/4]

CORE_UniquePointer< CORE_Object > CORE_ClassFactory::NewInstance ( const tString &  name,
const CORE_OptionsList arguments 
) const
virtual

◆ NewInstance() [4/4]

template<class T >
CORE_UniquePointer<T> CORE_ClassFactory::NewInstance ( const tString &  name,
const CORE_OptionsList arguments 
) const
inline

create an unique instance of a class T

Parameters
[in]namename of the class to create
[in]arguments: arguments of the class (name,value)
Returns
an unique pointer to the class with name return null if the name is not recognized

◆ NewSharedPointer() [1/6]

template<class T >
CORE_SharedPointer<T> CORE_ClassFactory::NewSharedPointer ( ) const
inline

create a shared instance of a class with same type as T with no argument

Returns
a shared pointer to the class with name return null if the name is not recognized

◆ NewSharedPointer() [2/6]

template<class T >
CORE_SharedPointer<T> CORE_ClassFactory::NewSharedPointer ( const CORE_OptionsList arguments) const
inline

create a shared instance of a class with same type as T

Parameters
[in]arguments: arguments
Returns
a shared pointer to the class with same type as T return null if the name is not recognized

◆ NewSharedPointer() [3/6]

template<class T >
CORE_SharedPointer<T> CORE_ClassFactory::NewSharedPointer ( const tString &  name) const
inline

create a shared instance of a class with no argument

Parameters
[in]namename of the class to create
Returns
a shared pointer to the class with name return null shared pointer if the name is not recognized

◆ NewSharedPointer() [4/6]

template<class T >
CORE_SharedPointer<T> CORE_ClassFactory::NewSharedPointer ( const tString &  name,
const CORE_OptionsList arguments 
) const
inline

create a shared instance of a class

Parameters
[in]namename of the class to create
[in]arguments: arguments of the class (name,value)
Returns
a shared pointer to the class with name return null shared pointer if the name is not recognized

◆ NewSharedPointer() [5/6]

template<class T >
static CORE_SharedPointer<T> CORE_ClassFactory::NewSharedPointer ( CORE_UniquePointer< T > &&  up)
inlinestatic

create a shared instance of an unique pointer as a lvalue

Parameters
[in]upunique pointer
Returns
a shared pointer to the class of the unique pointer

◆ NewSharedPointer() [6/6]

template<class T >
static CORE_SharedPointer<T> CORE_ClassFactory::NewSharedPointer ( CORE_UniquePointer< T > &  up)
inlinestatic

create a shared instance of an unique pointer

Parameters
[in]upunique pointer
Returns
a shared pointer to the class of the unique pointer

◆ toString()

virtual tString CORE_ClassFactory::toString ( ) const
inlineoverridevirtual

get the string representation of the class

Returns
the string representation of the class

Reimplemented from CORE_Object.


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