21 #ifndef DATATOOLS_INTROSPECTION_ARGUMENT_H 22 #define DATATOOLS_INTROSPECTION_ARGUMENT_H 29 #include <boost/optional.hpp> 30 #include <boost/any.hpp> 31 #include <boost/program_options.hpp> 41 namespace introspection {
82 const std::string &
get_name()
const;
130 return _default_value_.type() ==
typeid(T);
138 "No default value is set!");
141 "Unmatching type info!");
142 return boost::any_cast<T>(_default_value_);
151 "Unmatching type info!");
152 _default_value_ = value_;
205 const std::string & prefix_ =
"")
const;
208 virtual void tree_dump(std::ostream & out_ = std::clog,
209 const std::string & title_ =
"",
210 const std::string & indent_ =
"",
211 bool inherit_ =
false)
const;
218 boost::optional<std::size_t> _rank_;
219 boost::optional<std::string> _name_;
220 boost::optional<std::string> _description_;
221 boost::any _default_value_;
222 boost::optional<std::string> _default_value_str_;
230 #endif // DATATOOLS_INTROSPECTION_ARGUMENT_H
#define DT_THROW_IF(Condition, ExceptionType, Message)
Definition: exception.h:76
Method argument access type.