107 inline static SP::CORE_Out
New(){
117 SP::CORE_Out p=
New();
118 p->setOutput(outputType);
128 inline static SP::CORE_Out
New(
const tFlag& outputType){
129 SP::CORE_Out p=
New();
130 p->setOutput(outputType);
189 setOutput(CORE_Integer::toBinString<3>(type));
260 return ((mVerbose & type ) / type == 1);
267 return ((mOutput & type ) / type == 1);
298 if (mOutputString==
null)
return "";
299 return mOutputString->str();
380 virtual void abort(){mIsAborting=
true;};
393 const vector<tString>& args){
431 if (type==WARNING_MSG) {
433 }
else if (type==ERROR_MSG) {
435 if (IS_ERROR_MESSAGE_PRINTED_ON_SCREEN) cerr << prefix<<str<<flush;
436 }
else if (type==DEBUG_MSG) {
440 if (
isOutput(SCREEN_OUTPUT) || ((type==ERROR_MSG) && IS_ERROR_MESSAGE_PRINTED_ON_SCREEN ) ) cout << prefix<<str<<flush;
441 if (
isOutput(FILE_OUTPUT)) (*mOutputFile) << prefix<<str<<flush;
442 if (
isOutput(STRING_OUTPUT)) (*mOutputString) << prefix<<str<<flush;
797 ret+=
"\t file name:"+mOutputFileName+
"\n";
tFlag mOutput
Definition: CORE_Out.h:64
static const tFlag CREATE
Definition: CORE_Out.h:38
static tBoolean IS_ERROR_MESSAGE_PRINTED_ON_SCREEN
Definition: CORE_Out.h:50
static tString boolean2String(const tBoolean &c)
return the string representation true or false of boolean c
Definition: CORE_String.h:460
static SP::CORE_Out New(const tFlag &outputType)
create a CORE_out class on string,file or/and std outputs
Definition: CORE_Out.h:128
CORE_Out & templatedPrint(const tFlag &type, const T &str)
print the msg value for the type in {ERROR_MSG, WARNING_MSG, DEBUG_MSG , COMMENt_MSG} on th eoutput ...
Definition: CORE_Out.h:425
tFlag mOutputFileMode_back
Definition: CORE_Out.h:71
#define tLDouble
Definition: types.h:54
void release()
de-allocate the memory
Definition: CORE_Out.cpp:51
void setVerbose(const tFlag &f)
set the type of verbose of the int conversion of the binary form CDWE
Definition: CORE_Out.h:157
virtual void ask(const tString &question, tString &ret)
ask a question
Definition: CORE_Out.cpp:174
#define tDouble
Definition: types.h:52
const tFlag & getOutput()
get output type
Definition: CORE_Out.h:283
virtual void println(const tFlag &type, const tString &message)
print the message with an end of line
Definition: CORE_Out.h:342
virtual CORE_Out & genericPrint(const tFlag &type, const tLLInt &obj)
print Operators
Definition: CORE_Out.h:729
friend CORE_Out & operator<<(CORE_Out &out, const CORE_Object &obj)
print Operators
Definition: CORE_Out.h:457
virtual void printString(const tString &message)
print a string
Definition: CORE_Out.h:327
tBoolean isAborting() const
abort
Definition: CORE_Out.h:384
virtual CORE_Out & genericPrint(const tFlag &type, const tString &obj)
print Operators
Definition: CORE_Out.h:636
void update()
update the output
Definition: CORE_Out.h:242
static const tFlag & getPrintedType()
get the default printed type of message to print
Definition: CORE_Out.h:252
#define tFloat
Definition: types.h:50
CORE_Out()
build a CORE_Out
Definition: CORE_Out.cpp:24
void setOutputFile(const tString &fileName, const tFlag &mode)
set output file
Definition: CORE_Out.cpp:167
static const tFlag SCREEN_OUTPUT
Definition: CORE_Out.h:31
static const tFlag DEBUG_MSG
Definition: CORE_Out.h:45
tFlag mVerbose_back
Definition: CORE_Out.h:61
#define tUSInt
Definition: types.h:28
virtual void printTime(const tFlag &type)
print time
Definition: CORE_Out.h:362
virtual CORE_Out & genericPrint(const tFlag &type, const tDComplex &obj)
print Operators
Definition: CORE_Out.h:778
static SP::CORE_Out New(const tString &outputType)
create a CORE_out class on string,file or/and std outputs
Definition: CORE_Out.h:116
#define tFComplex
Definition: types.h:57
#define tBoolean
Definition: types.h:139
virtual void printInt(const tInteger &i)
print an integer
Definition: CORE_Out.h:320
void backup()
backup the output
Definition: CORE_Out.cpp:87
tFlag mVerbose
Definition: CORE_Out.h:60
tBoolean mIsAborting
Definition: CORE_Out.h:54
#define tLInt
Definition: types.h:42
virtual CORE_Out & genericPrint(const tFlag &type, const CORE_Object &obj)
print Operators
Definition: CORE_Out.h:628
tFlag mOutputFileMode
Definition: CORE_Out.h:68
tString getOutputFileName() const
get the output file name
Definition: CORE_Out.h:290
tString toString() const
return the string associated to the integer
Definition: CORE_Integer.h:106
static const tFlag WARNING_MSG
Definition: CORE_Out.h:43
static void setPrintedType(const tFlag &type)
set the type of message to print
Definition: CORE_Out.h:146
#define null
Definition: types.h:144
#define tDComplex
Definition: types.h:60
void printTime()
print time
Definition: CORE_Out.h:367
void setOutputFile(const tString &fileName)
set output file
Definition: CORE_Out.h:236
void createStreams()
Definition: CORE_Out.cpp:138
virtual void abort()
abort the process
Definition: CORE_Out.h:380
static SP::CORE_Out New()
create a CORE_out class : no output by default
Definition: CORE_Out.h:107
virtual CORE_Out & genericPrint(const tFlag &type, const tUChar &obj)
print Operators
Definition: CORE_Out.h:671
tBoolean isVerbose(const tFlag &type)
return true if the printed type is type
Definition: CORE_Out.h:259
virtual CORE_Out & genericPrint(const tFlag &type, const tULInt &obj)
print Operators
Definition: CORE_Out.h:721
#define tULInt
Definition: types.h:39
#define SP_OBJECT(X)
Definition: CORE_Pointers.h:203
static tFlag mPrintedType
Definition: CORE_Out.h:57
virtual CORE_Out & genericPrint(const tFlag &type, const tSInt &obj)
print Operators
Definition: CORE_Out.h:680
static const tFlag COMMENT_MSG
Definition: CORE_Out.h:47
void setOutput(const tFlag &type)
set outputType of the int conversion of the binary form : SFO
Definition: CORE_Out.h:188
tString str() const
get the output string
Definition: CORE_Out.h:305
tString getOutputString() const
get the output string
Definition: CORE_Out.h:297
#define tLLInt
Definition: types.h:47
virtual CORE_Out & genericPrint(const tFlag &type, const tUSInt &obj)
print Operators
Definition: CORE_Out.h:688
static const tFlag FILE_OUTPUT
Definition: CORE_Out.h:33
static tString getTime()
get time
Definition: CORE_Out.cpp:184
void reset()
reset the output
Definition: CORE_Out.cpp:65
#define tSInt
Definition: types.h:30
virtual CORE_Out & genericPrint(const tFlag &type, const tLInt &obj)
print Operators
Definition: CORE_Out.h:713
virtual CORE_Out & genericPrint(const tFlag &type, const tLDComplex &obj)
print Operators
Definition: CORE_Out.h:786
virtual CORE_Out & genericPrint(const tFlag &type, const tChar &obj)
print Operators
Definition: CORE_Out.h:654
virtual CORE_Out & genericPrint(const tFlag &type, const tLDouble &obj)
print Operators
Definition: CORE_Out.h:762
virtual void print(const tString &message)
print a string
Definition: CORE_Out.h:348
#define tUChar
Definition: types.h:20
#define tUInt
Definition: types.h:33
tBoolean isOutput(const tFlag &type)
return true if the output is selected
Definition: CORE_Out.h:266
virtual CORE_Out & genericPrint(const tFlag &type, const tFComplex &obj)
print Operators
Definition: CORE_Out.h:770
tString mOutputFileName_back
Definition: CORE_Out.h:72
virtual CORE_Out & genericPrint(const tFlag &type, const tULLInt &obj)
print Operators
Definition: CORE_Out.h:737
virtual CORE_Out & genericPrint(const tFlag &type, const tDouble &obj)
print Operators
Definition: CORE_Out.h:753
#define tUIndex
Definition: types.h:126
void setOutputBit(const tUChar &index, const tBoolean &v)
set only the bit value at index to v of the output type
Definition: CORE_Out.cpp:133
virtual CORE_Out & genericPrint(const tFlag &type, const tFloat &obj)
print Operators
Definition: CORE_Out.h:745
virtual void printArgs(const tFlag &type, const vector< tString > &args)
print args
Definition: CORE_Out.h:392
virtual ~CORE_Out(void)
destroy a CORE_Out
Definition: CORE_Out.cpp:45
abstract base class for most classes.
Definition: CORE_Object.h:53
#define tString
Definition: types.h:135
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.h:326
static const tFlag APPEND
Definition: CORE_Out.h:36
#define tChar
Definition: types.h:23
ofstream * mOutputFile
Definition: CORE_Out.h:74
static const tFlag STRING_OUTPUT
Definition: CORE_Out.h:29
static CORE_Out & out()
get the output
Definition: CORE_Object.h:198
static const tFlag ERROR_MSG
Definition: CORE_Out.h:41
std::stringstream * mOutputString
Definition: CORE_Out.h:77
this class describes the output by default write on standart output
Definition: CORE_Out.h:22
virtual CORE_Out & genericPrint(const tFlag &type, const tBoolean &obj)
print Operators
Definition: CORE_Out.h:645
virtual CORE_Out & genericPrint(const tFlag &type, const tChar *obj)
print Operators
Definition: CORE_Out.h:663
#define tLDComplex
Definition: types.h:63
tFlag mOutput_back
Definition: CORE_Out.h:65
tString mOutputFileName
Definition: CORE_Out.h:69
#define tULLInt
Definition: types.h:45
virtual void println(const tString &message)
print a string and an end of line
Definition: CORE_Out.h:354
virtual CORE_Out & genericPrint(const tFlag &type, const tInt &obj)
print Operators
Definition: CORE_Out.h:696
#define tInt
Definition: types.h:35
void restore()
restore the ouput from the last backup
Definition: CORE_Out.cpp:93
ofstream & getOutputFile()
get output
Definition: CORE_Out.h:274
#define tInteger
Definition: types.h:90
virtual CORE_Out & genericPrint(const tFlag &type, const tUInt &obj)
print Operators
Definition: CORE_Out.h:704
virtual void print(const tFlag &type, const tString &message)
print a string
Definition: CORE_Out.h:335
virtual tString toString() const
return the string representation of the class
Definition: CORE_Out.h:794
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74