Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Friends | List of all members
datatools::command::returned_info Class Reference

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...
 

Detailed Description

Command returned information.

Constructor & Destructor Documentation

◆ returned_info() [1/3]

datatools::command::returned_info::returned_info ( )

Default constructor.

◆ returned_info() [2/3]

datatools::command::returned_info::returned_info ( const std::string &  output_)

Constructor of a successful command returned info.

◆ returned_info() [3/3]

datatools::command::returned_info::returned_info ( error_code_type  code_,
const std::string &  message_ = "" 
)

Constructor of a failed command returned info.

◆ ~returned_info()

datatools::command::returned_info::~returned_info ( )

Destructor.

Member Function Documentation

◆ error_is()

bool datatools::command::returned_info::error_is ( error_code_type  code_) const

Check if error code matches a given value.

◆ get_error_code()

error_code_type datatools::command::returned_info::get_error_code ( ) const

Return the error code.

◆ get_error_message()

const std::string& datatools::command::returned_info::get_error_message ( ) const

Get the error message.

◆ get_output()

const std::string& datatools::command::returned_info::get_output ( ) const

Get the output.

◆ has_error_message()

bool datatools::command::returned_info::has_error_message ( ) const

Check if an error message is set.

◆ has_output()

bool datatools::command::returned_info::has_output ( ) const

Check if an output is set.

◆ is_continue()

bool datatools::command::returned_info::is_continue ( ) const

Check continue.

◆ is_deprecated()

bool datatools::command::returned_info::is_deprecated ( ) const

Check deprecation.

◆ is_failure()

bool datatools::command::returned_info::is_failure ( ) const

Check failure.

◆ is_special()

bool datatools::command::returned_info::is_special ( ) const

Check special case.

◆ is_stop()

bool datatools::command::returned_info::is_stop ( ) const

Check stop.

◆ is_success()

bool datatools::command::returned_info::is_success ( ) const

Check success.

◆ reset()

void datatools::command::returned_info::reset ( )

Reset.

◆ set_continue()

void datatools::command::returned_info::set_continue ( )

Set continue code.

◆ set_error_code()

void datatools::command::returned_info::set_error_code ( error_code_type  code_)

Set the error code.

◆ set_error_message()

void datatools::command::returned_info::set_error_message ( const std::string &  message_)

Set the error message.

◆ set_failure()

void datatools::command::returned_info::set_failure ( error_code_type  code_,
const std::string &  message_ = "" 
)

Set error code and message.

◆ set_output()

void datatools::command::returned_info::set_output ( const std::string &  output_)

Set the output.

◆ set_stop()

void datatools::command::returned_info::set_stop ( )

Set stop code.

◆ set_success()

void datatools::command::returned_info::set_success ( const std::string &  output_ = "")

Set success code and output.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out_,
const returned_info ri_ 
)
friend

Print operator.


The documentation for this class was generated from the following file: