28 #ifndef HMI_CONSOLE_OUTPUT_HPP 29 #define HMI_CONSOLE_OUTPUT_HPP 67 coloron(
"\033[1;34m"), coloroff(
"\033[0m"),
68 _prompt(
"HMIConsoleOutput :\n")
90 if ( ! messages.
str().empty() ) {
91 std::cout << coloron << _prompt<< coloroff <<
92 messages.
str() << std::endl;
93 messages.rdbuf()->
str(
"");
98 if ( ! logmessages.
str().empty() ) {
100 logmessages.rdbuf()->
str(
"");
111 coloron =
"\033[1;34m";
112 coloroff =
"\033[0m";
133 this->enqueue( what );
148 messages << backup.
str();
149 messages << what << std::endl;
150 backup.rdbuf()->
str(
"");
153 backup << what << std::endl;
156 if ( this->engine()->getActivity() )
157 this->engine()->getActivity()->trigger();
165 this->enqueue( what );
173 this->enqueue( what );
181 this->enqueue( what );
191 logmessages << logbackup.
str();
193 logbackup.rdbuf()->
str(
"");
198 if ( this->engine()->getActivity() )
199 this->engine()->getActivity()->trigger();
203 void log(
const std::string & what)
void displayInt(int what)
Display an integer on standard output.
std::ostringstream logbackup
void enableColor(bool yesno=true)
void displayBool(bool what)
Display a boolean on standard output.
void dolog(const T &what)
void logInt(int what)
Log an integer on standard output.
std::ostringstream logmessages
void logDouble(double what)
Log a double on standard output.
std::ostringstream messages
void displayDouble(double what)
Display a double on standard output.
void display(const std::string &what)
Display a message on standard output.
void setPrompt(const std::string &prompt)
This component can be used to display messages on the standard output.
std::ostringstream backup
void enqueue(const T &what)
HMIConsoleOutput(const std::string &name="cout")
static Logger::LogFunction endlog()
void logBool(bool what)
Log a boolean on standard output.
void log(const std::string &what)