C++ main module for stochmagnet Package
1.0
|
this class describes the output stream by default write on standart output More...
#include <CORE_Out.h>
Public Member Functions | |
CORE_Out () | |
build a CORE_Out More... | |
virtual | ~CORE_Out (void) |
destroy a CORE_Out More... | |
virtual tMemSize | getMemorySize () const override |
return the memory size in byte More... | |
virtual tMemSize | getContentsMemorySize () const |
return nthe memory size of the included associations More... | |
void | update () |
update the state of the output More... | |
void | release () |
release the pointers More... | |
void | reset () |
reset the state of the class More... | |
void | setOutput (const tUSInt &mode) |
set outputType of the binary form v=2*f+s More... | |
void | setOutput (const tString &mode) |
set outputType of the binary form v='FS' More... | |
tBoolean | isOutput (const tUCInt &mode) const |
return true if the output is of the mode More... | |
void | setOutputFile (const tString &fileName, const tFlag &mode) |
set output file More... | |
void | setOutputFile (const tString &fileName) |
set output file More... | |
const tString & | getOutputFileName () const |
get the output file name More... | |
void | backup () |
backup the state before change More... | |
void | restore () |
restore the state after change More... | |
void | println (const tString &msg) |
print the message More... | |
void | print (const tString &msg) |
print the message More... | |
void | printError (const tString &msg) |
print the message on error output 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 CORE_UniquePointer< CORE_Out > | New () |
build a new instance of default output More... | |
static void | PrintProgressBar (const tString &message, const tInt &percent, tInt &oldPercent) |
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... | |
Static Public Attributes | |
static const tUCInt | NO_OUTPUT =0 |
static const tUCInt | SCREEN_OUTPUT =1 |
static const tUCInt | FILE_OUTPUT =2 |
static const tUCInt | ALL_OUTPUT =3 |
static const tFlag | APPEND =1 |
static const tFlag | CREATE =0 |
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 | |
tString | mOutputFileName |
tString | mOutputFileName_back |
std::ofstream * | mOutputFileStream |
tUCInt | mOutput |
tUCInt | mOutputFileMode |
tFlag | mOutput_back |
tFlag | mOutputFileMode_back |
std::weak_ptr< CORE_Object > | mThis |
Friends | |
template<typename T > | |
CORE_Out & | operator<< (CORE_Out &out, const T &obj) |
print Operators More... | |
this class describes the output stream by default write on standart output
After any change of the output call update();
|
inline |
build a CORE_Out
References mOutputFileStream, and reset().
Referenced by New().
|
inlinevirtual |
|
inline |
backup the state before change
References mOutput, mOutput_back, mOutputFileMode, mOutputFileMode_back, mOutputFileName, and mOutputFileName_back.
Referenced by reset().
|
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().
|
inlineinherited |
return a const shared pointer for this
References CORE_Object::mThis.
|
inlinevirtual |
return nthe memory size of the included associations
Reimplemented from CORE_Object.
References CORE_Object::getContentsMemorySize(), mOutputFileName, and mOutputFileName_back.
Referenced by 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 in byte
Reimplemented from CORE_Object.
References getContentsMemorySize().
|
inline |
|
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().
|
inlinestatic |
build a new instance of default output
References CORE_Out().
|
inline |
print the message
[in] | msg | message to print on output |
Referenced by SM_Run::run().
|
inline |
print the message on error output
[in] | msg | message to print on errot output |
Referenced by CORE_Exception::CORE_Exception(), SM_Beam::discretize(), SM_Test::elementaryTests(), and SM_Test::primaryTests().
|
inline |
print the message
[in] | msg | message to print on output |
Referenced by CORE_Run::SetDebugOptions().
|
inlinestatic |
|
inline |
release the pointers
References mOutputFileStream.
Referenced by update(), and ~CORE_Out().
|
inline |
reset the state of the class
References backup(), CREATE, mOutput, mOutputFileMode, mOutputFileName, SCREEN_OUTPUT, and update().
Referenced by CORE_Out().
|
inline |
restore the state after change
References mOutput, mOutput_back, mOutputFileMode, mOutputFileMode_back, mOutputFileName, mOutputFileName_back, and update().
|
inline |
set outputType of the binary form v='FS'
[in] | mode | the output mode
|
examples:
References setOutput(), and tUCInt.
|
inline |
set outputType of the binary form v=2*f+s
[in] | mode | the output mode
|
examples:
References mOutput.
Referenced by setOutput(), and CORE_Run::SetOutputOptions().
|
inline |
set output file
[in] | fileName | : name of the output file |
[in] | mode | mode of writting the output file |
References mOutputFileMode, and mOutputFileName.
Referenced by setOutputFile(), and CORE_Run::SetOutputOptions().
|
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.
|
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().
|
inline |
update the state of the output
References APPEND, FILE_OUTPUT, isOutput(), mOutputFileMode, mOutputFileName, mOutputFileStream, and release().
Referenced by reset(), restore(), and CORE_Run::SetOutputOptions().
print Operators
[in,out] | out | output stream |
[in] | obj | to print |
|
static |
Referenced by CORE_Run::SetOutputOptions().
|
static |
Referenced by CORE_Run::SetOutputOptions(), and update().
|
static |
Referenced by reset(), setOutputFile(), and CORE_Run::SetOutputOptions().
|
static |
Referenced by CORE_Run::SetOutputOptions(), and update().
|
private |
Referenced by backup(), isOutput(), reset(), restore(), and setOutput().
|
private |
Referenced by backup(), reset(), restore(), setOutputFile(), and update().
|
private |
Referenced by backup(), getContentsMemorySize(), getOutputFileName(), reset(), restore(), setOutputFile(), and update().
|
private |
Referenced by backup(), getContentsMemorySize(), and restore().
|
private |
Referenced by CORE_Out(), release(), and update().
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().
|
static |
Referenced by CORE_Run::SetOutputOptions().
|
static |
Referenced by reset(), and CORE_Run::SetOutputOptions().