Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | List of all members
datatools::introspection::argument Class Reference

Description of a method argument. More...

#include <bayeux/datatools/introspection/argument.h>

Inheritance diagram for datatools::introspection::argument:
datatools::i_tree_dumpable

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 methodget_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_descriptiongrab_data_description ()
 Return a mutable reference of the argument's data description. More...
 
const data_descriptionget_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_)
 

Detailed Description

Description of a method argument.

Member Enumeration Documentation

◆ arg_xc_flags

Flags for export to a container of properties.

Enumerator
ARG_XC_CLEAR 
ARG_XC_ACCESS 
ARG_XC_DATA_DESCRIPTION 
ARG_XC_RANK 
ARG_XC_NAME 
ARG_XC_DESCRIPTION 
ARG_XC_DEFAULT_VALUE_STR 
ARG_XC_DEFAULT 
ARG_XC_LAST 

Constructor & Destructor Documentation

◆ argument()

datatools::introspection::argument::argument ( )

Default constructor.

◆ ~argument()

datatools::introspection::argument::~argument ( )

Destructor.

Member Function Documentation

◆ export_to_config()

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.

◆ get_access()

access_type datatools::introspection::argument::get_access ( ) const

Return the argument's access mode.

◆ get_data_description()

const data_description& datatools::introspection::argument::get_data_description ( ) const

Return a non mutable reference of the argument's data description.

◆ get_default_value()

const boost::any& datatools::introspection::argument::get_default_value ( ) const

Return the argument's default_value.

◆ get_default_value_as()

template<class T >
const T& datatools::introspection::argument::get_default_value_as ( ) const
inline

Return the argument's default value.

◆ get_default_value_str()

const std::string& datatools::introspection::argument::get_default_value_str ( ) const

Return the default value string representation.

◆ get_description()

const std::string& datatools::introspection::argument::get_description ( ) const

Return a non mutable reference of the argument's description.

◆ get_method()

const method& datatools::introspection::argument::get_method ( ) const

Return the method of which the argument belong to the list of arguments.

◆ get_name()

const std::string& datatools::introspection::argument::get_name ( ) const

Return the argument's explicit name in the list of arguments it belongs to.

◆ get_rank()

std::size_t datatools::introspection::argument::get_rank ( ) const

Return the argument's explicit rank in the list of arguments it belongs to.

◆ grab_data_description()

data_description& datatools::introspection::argument::grab_data_description ( )

Return a mutable reference of the argument's data description.

◆ has_access()

bool datatools::introspection::argument::has_access ( ) const

Check if the argument has an access mode.

◆ has_data_description()

bool datatools::introspection::argument::has_data_description ( ) const

Check if the argument has a data description.

◆ has_default_value()

bool datatools::introspection::argument::has_default_value ( ) const

Check if the argument has a default value.

◆ has_default_value_str()

bool datatools::introspection::argument::has_default_value_str ( ) const

Check if the argument has a default value string representation.

◆ has_description()

bool datatools::introspection::argument::has_description ( ) const

Check if the argument has a description.

◆ has_method()

bool datatools::introspection::argument::has_method ( ) const

Check if the method of which the argument belong to the list of arguments is set.

◆ has_name()

bool datatools::introspection::argument::has_name ( ) const

Check if the argument has an explicit name in the list of arguments it belongs to.

◆ has_rank()

bool datatools::introspection::argument::has_rank ( ) const

Check if the argument has an explicit rank in the list of arguments it belongs to.

◆ initialize() [1/2]

void datatools::introspection::argument::initialize ( )

Initialization.

◆ initialize() [2/2]

void datatools::introspection::argument::initialize ( const datatools::properties )

Initialization.

◆ is_default_value_a()

template<class T >
bool datatools::introspection::argument::is_default_value_a ( ) const
inline

Check default value type.

◆ is_input()

bool datatools::introspection::argument::is_input ( ) const

Check if the argument is an input access argument.

◆ is_output()

bool datatools::introspection::argument::is_output ( ) const

Check if the argument is an output access argument.

◆ is_valid()

bool datatools::introspection::argument::is_valid ( ) const

Check validity.

◆ reset()

void datatools::introspection::argument::reset ( )

Reset.

◆ reset_method()

void datatools::introspection::argument::reset_method ( )

Reset the method of which the argument belong to the list of arguments.

◆ set_access()

void datatools::introspection::argument::set_access ( access_type  )

Set the argument's access mode.

◆ set_data_description()

void datatools::introspection::argument::set_data_description ( const data_description )

Set the argument's data description.

◆ set_default_value()

void datatools::introspection::argument::set_default_value ( const boost::any &  any_value_)

Set the argument's default_value.

◆ set_default_value_as()

template<class T >
void datatools::introspection::argument::set_default_value_as ( const T &  value_)
inline

Set the argument's default_value.

◆ set_default_value_str()

void datatools::introspection::argument::set_default_value_str ( const std::string &  v_)

Set the default value string representation.

◆ set_description()

void datatools::introspection::argument::set_description ( const std::string &  )

Set the argument's description.

◆ set_method()

void datatools::introspection::argument::set_method ( const method )

Set the method of which the argument belong to the list of arguments.

◆ set_name()

void datatools::introspection::argument::set_name ( const std::string &  )

Set the argument's explicit name in the list of arguments it belongs to.

◆ set_rank()

void datatools::introspection::argument::set_rank ( std::size_t  )

Set the argument's explicit rank in the list of arguments it belongs to.

◆ tree_dump()

virtual void datatools::introspection::argument::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.


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