Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Command returned information. More...
#include <bayeux/datatools/command_utils.h>
Public Member Functions | |
returned_info () | |
Default constructor. More... | |
returned_info (const std::string &output_) | |
Constructor of a successful command returned info. More... | |
returned_info (error_code_type code_, const std::string &message_="") | |
Constructor of a failed command returned info. More... | |
~returned_info () | |
Destructor. More... | |
void | set_continue () |
Set continue code. More... | |
void | set_stop () |
Set stop code. More... | |
void | set_success (const std::string &output_="") |
Set success code and output. More... | |
void | set_failure (error_code_type code_, const std::string &message_="") |
Set error code and message. More... | |
bool | is_stop () const |
Check stop. More... | |
bool | is_continue () const |
Check continue. More... | |
bool | is_deprecated () const |
Check deprecation. More... | |
bool | is_special () const |
Check special case. More... | |
bool | is_success () const |
Check success. More... | |
bool | is_failure () const |
Check failure. More... | |
bool | error_is (error_code_type code_) const |
Check if error code matches a given value. More... | |
void | set_error_code (error_code_type code_) |
Set the error code. More... | |
error_code_type | get_error_code () const |
Return the error code. More... | |
bool | has_error_message () const |
Check if an error message is set. More... | |
void | set_error_message (const std::string &message_) |
Set the error message. More... | |
const std::string & | get_error_message () const |
Get the error message. More... | |
bool | has_output () const |
Check if an output is set. More... | |
void | set_output (const std::string &output_) |
Set the output. More... | |
const std::string & | get_output () const |
Get the output. More... | |
void | reset () |
Reset. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out_, const returned_info &ri_) |
Print operator. More... | |
Command returned information.
datatools::command::returned_info::returned_info | ( | ) |
Default constructor.
datatools::command::returned_info::returned_info | ( | const std::string & | output_ | ) |
Constructor of a successful command returned info.
datatools::command::returned_info::returned_info | ( | error_code_type | code_, |
const std::string & | message_ = "" |
||
) |
Constructor of a failed command returned info.
datatools::command::returned_info::~returned_info | ( | ) |
Destructor.
bool datatools::command::returned_info::error_is | ( | error_code_type | code_ | ) | const |
Check if error code matches a given value.
error_code_type datatools::command::returned_info::get_error_code | ( | ) | const |
Return the error code.
const std::string& datatools::command::returned_info::get_error_message | ( | ) | const |
Get the error message.
const std::string& datatools::command::returned_info::get_output | ( | ) | const |
Get the output.
bool datatools::command::returned_info::has_error_message | ( | ) | const |
Check if an error message is set.
bool datatools::command::returned_info::has_output | ( | ) | const |
Check if an output is set.
bool datatools::command::returned_info::is_continue | ( | ) | const |
Check continue.
bool datatools::command::returned_info::is_deprecated | ( | ) | const |
Check deprecation.
bool datatools::command::returned_info::is_failure | ( | ) | const |
Check failure.
bool datatools::command::returned_info::is_special | ( | ) | const |
Check special case.
bool datatools::command::returned_info::is_stop | ( | ) | const |
Check stop.
bool datatools::command::returned_info::is_success | ( | ) | const |
Check success.
void datatools::command::returned_info::reset | ( | ) |
Reset.
void datatools::command::returned_info::set_continue | ( | ) |
Set continue code.
void datatools::command::returned_info::set_error_code | ( | error_code_type | code_ | ) |
Set the error code.
void datatools::command::returned_info::set_error_message | ( | const std::string & | message_ | ) |
Set the error message.
void datatools::command::returned_info::set_failure | ( | error_code_type | code_, |
const std::string & | message_ = "" |
||
) |
Set error code and message.
void datatools::command::returned_info::set_output | ( | const std::string & | output_ | ) |
Set the output.
void datatools::command::returned_info::set_stop | ( | ) |
Set stop code.
void datatools::command::returned_info::set_success | ( | const std::string & | output_ = "" | ) |
Set success code and output.
|
friend |
Print operator.