Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Description of a method argument. More...
#include <bayeux/datatools/introspection/argument.h>
Public Types | |
enum | arg_xc_flags { ARG_XC_CLEAR = bit_mask::bit00, ARG_XC_ACCESS = bit_mask::bit01, ARG_XC_DATA_DESCRIPTION = bit_mask::bit02, ARG_XC_RANK = bit_mask::bit03, ARG_XC_NAME = bit_mask::bit04, ARG_XC_DESCRIPTION = bit_mask::bit05, ARG_XC_DEFAULT_VALUE_STR = bit_mask::bit06, ARG_XC_DEFAULT, ARG_XC_LAST = ARG_XC_DEFAULT_VALUE_STR } |
Flags for export to a container of properties. More... | |
Public Types inherited from datatools::i_tree_dumpable | |
enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
Enumeration for standard output streams. More... | |
Public Member Functions | |
argument () | |
Default constructor. More... | |
~argument () | |
Destructor. More... | |
bool | has_method () const |
Check if the method of which the argument belong to the list of arguments is set. More... | |
void | set_method (const method &) |
Set the method of which the argument belong to the list of arguments. More... | |
void | reset_method () |
Reset the method of which the argument belong to the list of arguments. More... | |
const method & | get_method () const |
Return the method of which the argument belong to the list of arguments. More... | |
bool | has_rank () const |
Check if the argument has an explicit rank in the list of arguments it belongs to. More... | |
std::size_t | get_rank () const |
Return the argument's explicit rank in the list of arguments it belongs to. More... | |
void | set_rank (std::size_t) |
Set the argument's explicit rank in the list of arguments it belongs to. More... | |
bool | has_name () const |
Check if the argument has an explicit name in the list of arguments it belongs to. More... | |
const std::string & | get_name () const |
Return the argument's explicit name in the list of arguments it belongs to. More... | |
void | set_name (const std::string &) |
Set the argument's explicit name in the list of arguments it belongs to. More... | |
bool | has_access () const |
Check if the argument has an access mode. More... | |
access_type | get_access () const |
Return the argument's access mode. More... | |
void | set_access (access_type) |
Set the argument's access mode. More... | |
bool | has_description () const |
Check if the argument has a description. More... | |
const std::string & | get_description () const |
Return a non mutable reference of the argument's description. More... | |
void | set_description (const std::string &) |
Set the argument's description. More... | |
bool | is_input () const |
Check if the argument is an input access argument. More... | |
bool | is_output () const |
Check if the argument is an output access argument. More... | |
bool | has_data_description () const |
Check if the argument has a data description. More... | |
data_description & | grab_data_description () |
Return a mutable reference of the argument's data description. More... | |
const data_description & | get_data_description () const |
Return a non mutable reference of the argument's data description. More... | |
void | set_data_description (const data_description &) |
Set the argument's data description. More... | |
bool | has_default_value () const |
Check if the argument has a default value. More... | |
template<class T > | |
bool | is_default_value_a () const |
Check default value type. More... | |
template<class T > | |
const T & | get_default_value_as () const |
Return the argument's default value. More... | |
template<class T > | |
void | set_default_value_as (const T &value_) |
Set the argument's default_value. More... | |
const boost::any & | get_default_value () const |
Return the argument's default_value. More... | |
void | set_default_value (const boost::any &any_value_) |
Set the argument's default_value. More... | |
bool | has_default_value_str () const |
Check if the argument has a default value string representation. More... | |
const std::string & | get_default_value_str () const |
Return the default value string representation. More... | |
void | set_default_value_str (const std::string &v_) |
Set the default value string representation. More... | |
bool | is_valid () const |
Check validity. More... | |
void | initialize () |
Initialization. More... | |
void | initialize (const datatools::properties &) |
Initialization. More... | |
void | reset () |
Reset. More... | |
void | export_to_config (datatools::properties &config_, uint32_t flags_=ARG_XC_DEFAULT, const std::string &prefix_="") const |
Export to a container of properties. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
Main new interface method for printing. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Additional Inherited Members | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
Description of a method argument.
datatools::introspection::argument::argument | ( | ) |
Default constructor.
datatools::introspection::argument::~argument | ( | ) |
Destructor.
void datatools::introspection::argument::export_to_config | ( | datatools::properties & | config_, |
uint32_t | flags_ = ARG_XC_DEFAULT , |
||
const std::string & | prefix_ = "" |
||
) | const |
Export to a container of properties.
access_type datatools::introspection::argument::get_access | ( | ) | const |
Return the argument's access mode.
const data_description& datatools::introspection::argument::get_data_description | ( | ) | const |
Return a non mutable reference of the argument's data description.
const boost::any& datatools::introspection::argument::get_default_value | ( | ) | const |
Return the argument's default_value.
|
inline |
Return the argument's default value.
const std::string& datatools::introspection::argument::get_default_value_str | ( | ) | const |
Return the default value string representation.
const std::string& datatools::introspection::argument::get_description | ( | ) | const |
Return a non mutable reference of the argument's description.
Return the method of which the argument belong to the list of arguments.
const std::string& datatools::introspection::argument::get_name | ( | ) | const |
Return the argument's explicit name in the list of arguments it belongs to.
std::size_t datatools::introspection::argument::get_rank | ( | ) | const |
Return the argument's explicit rank in the list of arguments it belongs to.
data_description& datatools::introspection::argument::grab_data_description | ( | ) |
Return a mutable reference of the argument's data description.
bool datatools::introspection::argument::has_access | ( | ) | const |
Check if the argument has an access mode.
bool datatools::introspection::argument::has_data_description | ( | ) | const |
Check if the argument has a data description.
bool datatools::introspection::argument::has_default_value | ( | ) | const |
Check if the argument has a default value.
bool datatools::introspection::argument::has_default_value_str | ( | ) | const |
Check if the argument has a default value string representation.
bool datatools::introspection::argument::has_description | ( | ) | const |
Check if the argument has a description.
bool datatools::introspection::argument::has_method | ( | ) | const |
Check if the method of which the argument belong to the list of arguments is set.
bool datatools::introspection::argument::has_name | ( | ) | const |
Check if the argument has an explicit name in the list of arguments it belongs to.
bool datatools::introspection::argument::has_rank | ( | ) | const |
Check if the argument has an explicit rank in the list of arguments it belongs to.
void datatools::introspection::argument::initialize | ( | ) |
Initialization.
void datatools::introspection::argument::initialize | ( | const datatools::properties & | ) |
Initialization.
|
inline |
Check default value type.
bool datatools::introspection::argument::is_input | ( | ) | const |
Check if the argument is an input access argument.
bool datatools::introspection::argument::is_output | ( | ) | const |
Check if the argument is an output access argument.
bool datatools::introspection::argument::is_valid | ( | ) | const |
Check validity.
void datatools::introspection::argument::reset | ( | ) |
Reset.
void datatools::introspection::argument::reset_method | ( | ) |
Reset the method of which the argument belong to the list of arguments.
void datatools::introspection::argument::set_access | ( | access_type | ) |
Set the argument's access mode.
void datatools::introspection::argument::set_data_description | ( | const data_description & | ) |
Set the argument's data description.
void datatools::introspection::argument::set_default_value | ( | const boost::any & | any_value_ | ) |
Set the argument's default_value.
|
inline |
Set the argument's default_value.
void datatools::introspection::argument::set_default_value_str | ( | const std::string & | v_ | ) |
Set the default value string representation.
void datatools::introspection::argument::set_description | ( | const std::string & | ) |
Set the argument's description.
Set the method of which the argument belong to the list of arguments.
void datatools::introspection::argument::set_name | ( | const std::string & | ) |
Set the argument's explicit name in the list of arguments it belongs to.
void datatools::introspection::argument::set_rank | ( | std::size_t | ) |
Set the argument's explicit rank in the list of arguments it belongs to.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.