C++ main module for stochmagnet Package
1.0
|
this class describes the chono class by default write on standart output More...
#include <CORE_Chrono.h>
Public Member Functions | |
CORE_Chrono () | |
build a CORE_Chrono More... | |
virtual | ~CORE_Chrono (void) |
destroy a CORE_Chrono More... | |
virtual tMemSize | getMemorySize () const override |
return the memory size of the class and the memory size of all its attributes/associations More... | |
void | start () |
start the chrono More... | |
std::chrono::duration< tReal > | stop () |
stop the chrono and return the duration time in seconds as a real More... | |
tString | getDate () |
get the date in string 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... | |
virtual tMemSize | getContentsMemorySize () const |
return nthe memory size of the included associations 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 tULLInt | GetClockTime () |
static tULLInt | GetClockDuration (const tULLInt &startTime) |
static tULLInt | ConvertDuration (std::chrono::duration< tReal > &&duration) |
convert duration in ms @retunr the duration in milli seconds More... | |
static tULLInt | ConvertDuration (const std::chrono::duration< tReal > &duration) |
convert duration in ms @retunr the duration in milli seconds More... | |
static tReal | ConvertDuration (std::chrono::duration< tReal > &&duration, tUInt &d, tUInt &h, tUInt &m, tUInt &s, tUInt &ms, tUInt &mus, tUInt &ns) |
convert the duration as days,hours,minutes,second,milliseconds,microseconds More... | |
static tReal | ConvertDuration (std::chrono::duration< tReal > &duration, tUInt &d, tUInt &h, tUInt &m, tUInt &s, tUInt &ms, tUInt &mus, tUInt &ns) |
convert the duration as days,hours,minutes,second,milliseconds,microseconds More... | |
static tString | GetDate () |
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::chrono::high_resolution_clock | mTimer |
std::chrono::time_point< std::chrono::high_resolution_clock > | mStart |
tUInt | mYear |
tCInt | mMonth |
tUCInt | mDay |
tUCInt | mWeekDay |
tUCInt | mHour |
tUCInt | mMinute |
tUCInt | mSecond |
std::weak_ptr< CORE_Object > | mThis |
this class describes the chono class by default write on standart output
|
inline |
|
inlinevirtual |
destroy a CORE_Chrono
|
inlinestatic |
convert duration in ms @retunr the duration in milli seconds
|
inlinestatic |
convert duration in ms @retunr the duration in milli seconds
Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::run(), CORE_Test::testArray(), CORE_Test::testChrono(), CORE_Test::testField(), CORE_Test::testLoops(), SM_Test::testNormalLaw(), SM_Test::testVirtualMethods(), and CORE_Test::uniformRandomTest().
|
inlinestatic |
convert the duration as days,hours,minutes,second,milliseconds,microseconds
[in] | duration | duration as a real expressed in seconds as a lvalue |
[out] | d | number of days |
[out] | h | number of hours |
[out] | m | number of minutes |
[out] | s | number of seconds |
[out] | ms | number of milli-seconds |
[out] | mus | number of micro-seconds |
[out] | ns | number of nano-seconds |
duration*1000*1000 = mus+1000*(ms+1000*(s+60*(m+60*(h+24*d))))
References tReal.
|
inlinestatic |
convert the duration as days,hours,minutes,second,milliseconds,microseconds
[in] | duration | duration as a real expressed in seconds as a reference |
[out] | d | number of days |
[out] | h | number of hours |
[out] | m | number of minutes |
[out] | s | number of seconds |
[out] | ms | number of milli-seconds |
[out] | mus | number of micro-seconds |
[out] | ns | number of nano-seconds |
duration*1000*1000 = mus+1000*(ms+1000*(s+60*(m+60*(h+24*d))))
References tReal.
|
inlinestaticinherited |
disable the memory stack
Referenced by CORE_Object::EnableMemoryStack().
|
inlinestaticinherited |
enable the memory stack
Referenced by CORE_Object::EnableMemoryStack(), and CORE_Run::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().
|
inlineinherited |
return the name of the class
Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().
|
inlinestatic |
|
inlineinherited |
return a const shared pointer for this
References CORE_Object::mThis.
|
inlinevirtualinherited |
return nthe memory size of the included associations
Reimplemented in CORE_VectorList< T, I >, CORE_VectorList< tString, CORE_StringsList >, CORE_ValArray< T, I >, CORE_ValArray< T, CORE_StdValArray< T > >, CORE_Run, CORE_PtrArray< T, I >, CORE_PtrArray< T, CORE_StdPtrArray< T > >, 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_ClassFactory, SMS_STDUniformFunction, SMS_STDNormalFunction, SMS_BoostUniformFunction, SMS_BoostNormalFunction, SM_ZeemanOperator, SM_XDMF, SM_VTK, SM_System, SM_Output, SM_Operator, SM_Network, SM_DemagnetizedOperator, SM_Beam, CORE_StringsList, and CORE_Out.
Referenced by CORE_Out::getContentsMemorySize(), SM_Beam::getContentsMemorySize(), SM_Network::getContentsMemorySize(), SM_Operator::getContentsMemorySize(), SM_Output::getContentsMemorySize(), SM_System::getContentsMemorySize(), SM_VTK::getContentsMemorySize(), SMS_BoostNormalFunction::getContentsMemorySize(), SMS_BoostUniformFunction::getContentsMemorySize(), SMS_STDNormalFunction::getContentsMemorySize(), SMS_STDUniformFunction::getContentsMemorySize(), CORE_ClassFactory::getContentsMemorySize(), CORE_PtrArray< T, I >::getContentsMemorySize(), CORE_ValArray< T, I >::getContentsMemorySize(), CORE_VectorList< T, I >::getContentsMemorySize(), CORE_Object::getMemorySize(), SM_ConstantNoiseRateFunction::getMemorySize(), SM_InverseNoiseRateFunction::getMemorySize(), SM_LandauLifschitzFunction::getMemorySize(), SM_NoiseRateFunction::getMemorySize(), SM_Object::getMemorySize(), SM_StochasticFunction::getMemorySize(), SM_TemplatedNoiseRateFunction< DerivedClass >::getMemorySize(), SM_TimeStepper::getMemorySize(), SMS_BoostRandomFunction::getMemorySize(), CORE_Array< T, I >::getMemorySize(), getMemorySize(), CORE_Collection< T, I >::getMemorySize(), CORE_IO::getMemorySize(), CORE_List< T, K, I >::getMemorySize(), CORE_OptionsReader::getMemorySize(), CORE_OutputFile::getMemorySize(), and CORE_Test::getMemorySize().
|
inline |
|
inlinestatic |
References getDate().
Referenced by SM_Run::run(), and CORE_OptionsReader::SaveOptionsToFile().
|
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 and the memory size of all its attributes/associations
Reimplemented from CORE_Object.
References CORE_Object::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.
|
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().
|
inlinestaticinherited |
get the memory stack in string
Referenced by main().
|
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.
|
inline |
start the chrono
References mStart, and mTimer.
Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::run(), CORE_Test::testArray(), CORE_Test::testChrono(), CORE_Test::testField(), CORE_Test::testLoops(), SM_Test::testNormalLaw(), SM_Test::testVirtualMethods(), and CORE_Test::uniformRandomTest().
|
inline |
stop the chrono and return the duration time in seconds as a real
References mStart, and mTimer.
Referenced by SM_Test::grid3DParticlesTestCase(), SM_Test::linedParticlesTestCase(), SM_Run::run(), CORE_Test::testArray(), CORE_Test::testChrono(), CORE_Test::testField(), CORE_Test::testLoops(), SM_Test::testNormalLaw(), SM_Test::testVirtualMethods(), and CORE_Test::uniformRandomTest().
|
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().
|
private |
Referenced by CORE_Chrono(), and getDate().
|
private |
Referenced by CORE_Chrono(), and getDate().
|
private |
Referenced by CORE_Chrono(), and getDate().
|
private |
Referenced by CORE_Chrono(), and getDate().
|
private |
Referenced by CORE_Chrono(), and getDate().
|
private |
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().
|
private |
Referenced by CORE_Chrono().
|
private |
Referenced by CORE_Chrono(), and getDate().