49 ofstream *mOutputFile;
50 std::stringstream *mOutputString;
81 inline static SP::CORE_Out
New(){
83 p->setOutputType(NO_OUTPUT);
89 inline static SP::CORE_Out
New(
const tFlag& outputType){
91 p->setOutputType(outputType);
103 if (mOutputType==STRING_OUTPUT) {
104 if (mOutputString!=
null)
delete mOutputString;
105 mOutputString=
new std::stringstream();
129 return mOutputFileName;
135 if (mOutputString==
null)
return "";
136 return mOutputString->str();
142 return ((mVerbose & type) / type != 0 );
153 print(WARNING_MSG,str);
159 print(type,str+
"\n");
179 virtual void print(
const int& type,
const long long int& str);
182 virtual void print(
const int& type,
const unsigned long long int& str);
185 virtual void print(
const int& type,
const long int& str);
188 virtual void print(
const int& type,
const unsigned long int& str);
192 virtual void print(
const int& type,
const long double& str);
197 virtual void print(
const int& type,
const int& str);
201 virtual void printInt(
const int& type,
const int& i) {
224 print(WARNING_MSG,str);
249 virtual void abort(){mIsAborting=
true;};
259 const vector<tString>& args){
262 for(
int i=0;i<n;i++) {
279 virtual void ask(
const tString& question,
int& ret);
290 out.
print(WARNING_MSG,obj);
297 out.
print(WARNING_MSG,obj);
303 out.
print(WARNING_MSG,obj);
309 out.
print(WARNING_MSG,obj);
315 out.
print(WARNING_MSG,obj);
321 out.
print(WARNING_MSG,obj);
327 out.
print(WARNING_MSG,obj);
tBoolean isVerbose(const int &type) const
return true if the type is printed
Definition: CORE_Out.h:141
static const tFlag CREATE
Definition: CORE_Out.h:34
tString getOutputString() const
get the output string
Definition: CORE_Out.h:134
static SP::CORE_Out New(const tFlag &outputType)
create a CORE_out class
Definition: CORE_Out.h:89
tString getOutputFileName() const
get the output file name
Definition: CORE_Out.h:128
void setOutputType(const tFlag &type)
set outputType
Definition: CORE_Out.h:101
virtual void ask(const tString &question, tString &ret)
ask a question
Definition: CORE_Out.cpp:62
void println(const int &type)
print with a new end line
Definition: CORE_Out.h:168
friend CORE_Out & operator<<(CORE_Out &out, const CORE_Object &obj)
print Operators
Definition: CORE_Out.h:283
virtual void print(const int &type, const tString &str)
print
Definition: CORE_Out.cpp:109
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:42
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:218
virtual void printError(const tString &str)
print error
Definition: CORE_Out.cpp:246
#define tBoolean
Definition: types.h:48
static const int ERROR_MSG
Definition: CORE_Out.h:36
virtual void printWarning(const tString &str)
print warning
Definition: CORE_Out.cpp:258
tBoolean isAborting() const
abort
Definition: CORE_Out.h:252
virtual void printReal(const int &type, const tReal &i)
print a real
Definition: CORE_Out.h:212
static const tFlag ALL_OUTPUT
Definition: CORE_Out.h:31
#define null
Definition: types.h:13
void printTime()
print time
Definition: CORE_Out.h:232
void setOutputFile(const tString &fileName)
set output file
Definition: CORE_Out.h:114
virtual void printInt(const int &type, const int &i)
print an integer
Definition: CORE_Out.h:201
virtual void abort()
abort
Definition: CORE_Out.h:249
static SP::CORE_Out New()
create a CORE_out class
Definition: CORE_Out.h:81
#define SP_OBJECT(X)
Definition: CORE_Pointers.h:203
virtual void printString(const tString &str)
print a string
Definition: CORE_Out.h:223
virtual void printInt(const int &i)
print an integer
Definition: CORE_Out.h:206
static const tFlag FILE_OUTPUT
Definition: CORE_Out.h:30
static tString getTime()
get time
Definition: CORE_Out.cpp:72
void print(const tString &str)
print
Definition: CORE_Out.h:152
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:173
#define tString
Definition: types.h:49
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:158
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:163
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:102
#define tReal
Definition: types.h:18
void setVerbose(const int &f)
set the type of message to print
Definition: CORE_Out.h:120
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:258