48 ofstream *mOutputFile;
50 std::stringstream *mOutputString;
79 inline static SP::CORE_Out
New(){
81 p->setOutputType(NO_OUTPUT);
87 inline static SP::CORE_Out
New(
const tFlag& outputType){
89 p->setOutputType(outputType);
101 if (mOutputType==STRING_OUTPUT) {
102 if (mOutputString!=
null)
delete mOutputString;
103 mOutputString=
new std::stringstream();
127 return mOutputFileName;
133 if (mOutputString==
null)
return "";
134 return mOutputString->str();
140 return ((mVerbose & type) / type != 0 );
151 print(WARNING_MSG,str);
157 print(type,str+
"\n");
177 virtual void print(
const int& type,
const tLong& str);
180 virtual void print(
const int& type,
const unsigned tLong& str);
184 virtual void print(
const int& type,
const long double& str);
189 virtual void print(
const int& type,
const int& str);
193 virtual void printInt(
const int& type,
const int& i) {
216 print(WARNING_MSG,str);
241 virtual void abort(){mIsAborting=
true;};
251 const vector<tString>& args){
254 for(
int i=0;i<n;i++) {
271 virtual void ask(
const tString& question,
int& ret);
282 out.
print(WARNING_MSG,obj);
289 out.
print(WARNING_MSG,obj);
295 out.
print(WARNING_MSG,obj);
301 out.
print(WARNING_MSG,obj);
307 out.
print(WARNING_MSG,obj);
tBoolean isVerbose(const int &type) const
return true if the type is printed
Definition: CORE_Out.h:139
static const tFlag CREATE
Definition: CORE_Out.h:34
tString getOutputString() const
get the output string
Definition: CORE_Out.h:132
static SP::CORE_Out New(const tFlag &outputType)
create a CORE_out class
Definition: CORE_Out.h:87
tString getOutputFileName() const
get the output file name
Definition: CORE_Out.h:126
void setOutputType(const tFlag &type)
set outputType
Definition: CORE_Out.h:99
virtual void ask(const tString &question, tString &ret)
ask a question
Definition: CORE_Out.cpp:57
void println(const int &type)
print with a new end line
Definition: CORE_Out.h:166
friend CORE_Out & operator<<(CORE_Out &out, const CORE_Object &obj)
print Operators
Definition: CORE_Out.h:275
virtual void print(const int &type, const tString &str)
print
Definition: CORE_Out.cpp:103
CORE_Out()
build a CORE_Out
Definition: CORE_Out.cpp:18
void setOutputFile(const tString &fileName, const tFlag &mode)
set output file
Definition: CORE_Out.cpp:37
static const tFlag SCREEN_OUTPUT
Definition: CORE_Out.h:29
virtual void printString(const int &type, const tString &str)
print a string
Definition: CORE_Out.h:210
virtual void printError(const tString &str)
print error
Definition: CORE_Out.cpp:201
#define tBoolean
Definition: types.h:35
static const int ERROR_MSG
Definition: CORE_Out.h:36
virtual void printWarning(const tString &str)
print warning
Definition: CORE_Out.cpp:213
tBoolean isAborting() const
abort
Definition: CORE_Out.h:244
virtual void printReal(const int &type, const tReal &i)
print a real
Definition: CORE_Out.h:204
static const tFlag ALL_OUTPUT
Definition: CORE_Out.h:31
#define null
Definition: types.h:13
void printTime()
print time
Definition: CORE_Out.h:224
void setOutputFile(const tString &fileName)
set output file
Definition: CORE_Out.h:112
virtual void printInt(const int &type, const int &i)
print an integer
Definition: CORE_Out.h:193
virtual void abort()
abort
Definition: CORE_Out.h:241
static SP::CORE_Out New()
create a CORE_out class
Definition: CORE_Out.h:79
#define tLong
Definition: types.h:29
#define SP_OBJECT(X)
Definition: CORE_Pointers.h:176
virtual void printString(const tString &str)
print a string
Definition: CORE_Out.h:215
virtual void printInt(const int &i)
print an integer
Definition: CORE_Out.h:198
static const tFlag FILE_OUTPUT
Definition: CORE_Out.h:30
static tString getTime()
get time
Definition: CORE_Out.cpp:67
void print(const tString &str)
print
Definition: CORE_Out.h:150
static const int DEBUG_MSG
Definition: CORE_Out.h:38
tString toString() const
return the string associated to the integer
Definition: CORE_Integer.h:142
virtual ~CORE_Out(void)
destroy a CORE_Out
Definition: CORE_Out.cpp:28
abstract base class for most classes.
Definition: CORE_Object.h:30
static const tFlag NO_OUTPUT
Definition: CORE_Out.h:27
void println()
print with a new end line
Definition: CORE_Out.h:171
#define tString
Definition: types.h:36
tString toString() const
return the string associated to the real
Definition: CORE_Real.h:89
static const tFlag APPEND
Definition: CORE_Out.h:33
static const tFlag STRING_OUTPUT
Definition: CORE_Out.h:28
void println(const int &type, const tString &str)
print with a new end line
Definition: CORE_Out.h:156
this class describes the output by default write on standart output
Definition: CORE_Out.h:21
static const int WARNING_MSG
Definition: CORE_Out.h:37
void println(const tString &str)
print with a new end line
Definition: CORE_Out.h:161
virtual void print()
print the class
Definition: CORE_Object.h:221
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.cpp:101
#define tReal
Definition: types.h:18
void setVerbose(const int &f)
set the type of message to print
Definition: CORE_Out.h:118
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14
virtual void setAction(const tFlag &type, const vector< tString > &args)
set the action
Definition: CORE_Out.h:250