C++ main module for stochmagnet Package
1.0
|
This class is an outpput results generator for stoch magnet program. More...
#include <CORE_Run.h>
Public Member Functions | |
CORE_Run (void) | |
create More... | |
virtual | ~CORE_Run (void) |
destroy More... | |
virtual tMemSize | getMemorySize () const override |
return the memory size of the class More... | |
virtual tMemSize | getContentsMemorySize () const override |
return the memory size in byte More... | |
virtual void | initManOptions (std::map< tString, std::map< tString, tString > > &options) const |
init the man of the options More... | |
virtual void | initOptions (std::map< tString, tString > &options) const |
default initialization of the options More... | |
virtual void | createClassFactories (const std::map< tString, tString > &options) const |
create the class factories from options More... | |
tBoolean | executeRun (int argc, char *argv[]) const |
run the program from main class More... | |
virtual tBoolean | makeRun (const tString &command, const std::map< tString, tString > &options) const |
make Run command More... | |
virtual tBoolean | makeTests (const std::map< tString, tString > &options) const |
make tests command More... | |
tBoolean | printHelp (const std::map< tString, tString > &options) const |
print the help More... | |
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... | |
virtual tString | toString () const |
return the string representation of the object node More... | |
Static Public Member Functions | |
static void | SetSoftName (const tString &soft) |
set soft name More... | |
static const tString & | GetSoftName () |
get soft name More... | |
static void | SetVersion (const tString &version) |
set the version More... | |
static const tString & | GetVersion () |
get the version More... | |
static const tBoolean & | IsProfiling () |
retun true if the code is in profing mode More... | |
static tBoolean | Is64Architecture () |
return true if the machine is a 64 bits machine More... | |
static tBoolean | Is32Architecture () |
return true if the machine is a 32 bits machine More... | |
static void | InitSeed (const unsigned int &seed) |
init the seed for uniform random generator More... | |
static void | InitSeed () |
init the seed for uniform random generator More... | |
static CORE_Out & | Out () |
return the output stream More... | |
static void | SetOutputOptions (const std::map< tString, tString > &option) |
create the output stream from the options More... | |
static void | SetDebugOptions (const std::map< tString, tString > &option) |
create the debug data from options More... | |
static CORE_ClassFactory & | GetClassFactory () |
return the class factory More... | |
static tBoolean | EnableMemoryStack (const tBoolean &isMemoryChecked) |
enable the memory stack More... | |
static void | EnableMemoryStack () |
enable the memory stack More... | |
static void | DisableMemoryStack () |
disable the memory stack More... | |
static tBoolean | IsMemoryStackEnabled () |
return trur if the memory stack is enabled More... | |
static tString | MemoryStackToString () |
get the memory stack in string More... | |
static tIndex | GetRegisteredClassesNumber () |
get the memory stack in string More... | |
Private Member Functions | |
template<class T > | |
std::shared_ptr< T > | setThis (std::unique_ptr< T, CORE_Object::Delete > &up) |
set the shared pointer from an unique pointer More... | |
Private Attributes | |
std::weak_ptr< CORE_Object > | mThis |
Static Private Attributes | |
static tString | mSoftName ="core.exe" |
static tString | mVersion ="VERSION" |
static CORE_UniquePointer< CORE_Out > | mOut =CORE_Out::New() |
static CORE_UniquePointer< CORE_ClassFactory > | mClassFactory =CORE_ClassFactory::New() |
static tBoolean | mIsProfiling =false |
This class is an outpput results generator for stoch magnet program.
This class is a Run class for core package.
This class is a Run class for Stoch Microm package.
The program is launch as follow:
core.exe [options] make [args]
with options:
wuih type:
execute core.exe –help to show the man
CORE_Run::CORE_Run | ( | void | ) |
create
|
virtual |
destroy
References mClassFactory, and mOut.
create the class factories from options
[in] | options | the options |
Reimplemented in SM_Run.
Referenced by executeRun().
|
inlinestaticinherited |
disable the memory stack
Referenced by CORE_Object::EnableMemoryStack().
|
inlinestaticinherited |
enable the memory stack
Referenced by CORE_Object::EnableMemoryStack(), and SetDebugOptions().
|
inlinestaticinherited |
enable the memory stack
[in] | isMemoryChecked | : true to verify memory allocation of CORE_Object classes |
References CORE_Object::DisableMemoryStack(), CORE_Object::EnableMemoryStack(), and CORE_Object::IsMemoryStackEnabled().
tBoolean CORE_Run::executeRun | ( | int | argc, |
char * | argv[] | ||
) | const |
run the program from main class
[in] | argc | number of arguments |
[in] | argv | the char* value of the arguments |
References createClassFactories(), initOptions(), makeRun(), makeTests(), printHelp(), CORE_OptionsReader::ReadOption(), CORE_OptionsReader::ReadOptions(), SetDebugOptions(), SetOutputOptions(), tInt, core_functions::trim(), and tString.
Referenced by run().
|
inlinestatic |
return the class factory
References mClassFactory.
Referenced by SM_Run::createClassFactories(), SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::loadBeamFromOptions(), SM_Run::loadOperatorsFromOptions(), and SM_Test::testOperators().
|
inlineinherited |
return the name of the class
Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().
|
inlineinherited |
return a const shared pointer for this
References CORE_Object::mThis.
|
inlineoverridevirtual |
return the memory size in byte
Reimplemented from CORE_Object.
References mClassFactory, and mOut.
Referenced by SM_Run::getMemorySize(), and getMemorySize().
|
inlineinherited |
retrun the string identification of the class
References CORE_Object::getClassName(), and core_functions::pointerToString().
Referenced by CORE_Test::testArray(), CORE_Test::testField(), CORE_Test::testTypes(), CORE_Object::toString(), CORE_ClassFactory::toString(), and CORE_Field< T, K, D, S, I >::toString().
|
inlineoverridevirtual |
return the memory size of the class
Reimplemented from CORE_Object.
Reimplemented in SM_Run.
References getContentsMemorySize().
|
inlineinherited |
retrun the pointer of the class as a string
References core_functions::pointerToString().
|
inlinestaticinherited |
get the memory stack in string
|
inlineinherited |
return the shared pointer for this
References CORE_Object::mThis.
|
inlinestatic |
get soft name
References mSoftName.
Referenced by printHelp(), and SM_Run::run().
|
inlinestatic |
get the version
References mVersion.
Referenced by printHelp(), and SM_Run::run().
|
virtual |
init the man of the options
[in] | options | man of the options |
Reimplemented in SM_Run.
Referenced by SM_Run::initManOptions(), and printHelp().
default initialization of the options
[in] | options | default values of the options |
Reimplemented in SM_Run.
Referenced by executeRun(), and SM_Run::initOptions().
|
inlinestatic |
init the seed for uniform random generator
|
inlinestatic |
init the seed for uniform random generator
[in] | seed | : seed for uniform random generator |
Referenced by CORE_Test::primaryTests().
|
inlinestatic |
return true if the machine is a 32 bits machine
References tLDouble.
Referenced by CORE_Test::testTypes().
|
inlinestatic |
return true if the machine is a 64 bits machine
References tLDouble.
Referenced by SM_VTK::getVTKType(), and CORE_Test::testTypes().
|
inlineinherited |
test if the clas T is an instance of this class
Referenced by SM_Beam::templatedSimulate().
|
inlinestaticinherited |
return trur if the memory stack is enabled
Referenced by CORE_Object::EnableMemoryStack(), and main().
|
inlinestatic |
retun true if the code is in profing mode
References mIsProfiling.
|
virtual |
make Run command
[in] | command | the command to run |
[in] | options | the options of the program |
Reimplemented in SM_Run.
References makeTests().
Referenced by executeRun(), and CORE_Test::testCase().
make tests command
[in] | options | the options of the program |
Reimplemented in SM_Run.
References CORE_Test::execute().
Referenced by executeRun(), and makeRun().
|
inlinestaticinherited |
get the memory stack in string
Referenced by main().
|
inlinestatic |
return the output stream
References mOut.
Referenced by CORE_Exception::CORE_Exception(), SM_Beam::discretize(), SM_Test::elementaryTests(), CORE_Test::execute(), SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), CORE_Test::primaryTests(), SM_Test::primaryTests(), printHelp(), SM_Run::run(), SetDebugOptions(), SetOutputOptions(), CORE_Test::testCase(), SM_Test::testDerivative(), SM_Test::testEnergyOperatorsDerivatives(), CORE_Test::testIO(), CORE_Test::testMemorySize(), SM_Test::testNormalLaw(), CORE_Test::testTypes(), SM_Test::testVirtualMethods(), and SM_Test::validate().
print the help
[in] | options | the options of the program |
References GetSoftName(), GetVersion(), initManOptions(), Out(), and tString.
Referenced by executeRun().
create the debug data from options
[in] | options | default values of the options |
References CORE_Object::EnableMemoryStack(), mIsProfiling, Out(), CORE_Out::println(), CORE_OptionsReader::ReadBoolean(), and tBoolean.
Referenced by executeRun(), and CORE_Test::testCase().
create the output stream from the options
[in] | options | default values of the options |
References CORE_Out::ALL_OUTPUT, CORE_Out::APPEND, CORE_Out::CREATE, CORE_Out::FILE_OUTPUT, CORE_Out::NO_OUTPUT, Out(), CORE_OptionsReader::ReadBoolean(), CORE_OptionsReader::ReadPath(), CORE_Out::SCREEN_OUTPUT, CORE_Out::setOutput(), CORE_Out::setOutputFile(), tBoolean, tFlag, tString, and CORE_Out::update().
Referenced by executeRun(), and CORE_Test::testCase().
|
inlinestatic |
set soft name
[in] | soft | name of the soft |
References mSoftName.
Referenced by SM_Run::SM_Run().
|
inlineprivateinherited |
set the shared pointer from an unique pointer
[in,out] | up | unique pointer of the class at input, points to null pointer at output |
Method only calledby the friend class CORE_ClassFactory::NewSharedInstance()
References CORE_Object::mThis.
|
inlinestatic |
set the version
version | name of the version set the version of the code |
References mVersion.
Referenced by SM_Run::SM_Run().
|
inlinevirtualinherited |
return the string representation of the object node
Reimplemented in SM_TimeStepper, SM_System, SM_StochasticFunction, SM_Network, SM_LandauLifschitzFunction, SM_Beam, CORE_Field< T, K, D, S, I >, CORE_Field< T, K, D, CORE_StdPtrArray< T >, CORE_StdPtrField< T, K, D > >, CORE_Field< T, K, D, CORE_StdValArray< T >, CORE_StdValField< T, K, D > >, CORE_Collection< T, I >, CORE_ClassFactory, and SM_NoiseRateFunction.
References CORE_Object::getIdentityString().
Referenced by SM_Run::run(), CORE_Collection< T, I >::toString(), SM_Beam::toString(), SM_Network::toString(), SM_StochasticFunction::toString(), SM_System::toString(), and SM_TimeStepper::toString().
|
staticprivate |
Referenced by GetClassFactory(), getContentsMemorySize(), and ~CORE_Run().
|
staticprivate |
Referenced by IsProfiling(), and SetDebugOptions().
|
staticprivate |
Referenced by getContentsMemorySize(), Out(), and ~CORE_Run().
|
staticprivate |
Referenced by GetSoftName(), and SetSoftName().
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().
|
staticprivate |
Referenced by GetVersion(), and SetVersion().