Class base_parser

Inheritance Relationships

Derived Types

Class Documentation

class base_parser

Interface specifying functionality for parsing parameters into a base_config derived parameter structure.

Subclassed by rcppsw::config::server::server_config_parser, rcppsw::config::xml::xml_config_parser

Public Functions

base_parser(void) = default
virtual ~base_parser(void) = default
template<typename T>
inline const T *config_get(void) const

Get the results of parameter parse. This is the front end of the non-virtual interface to getting the results of a parameter parse, so that covariance with smart pointer return types will work.

inline bool is_parsed(void) const
inline virtual bool validate(void) const

Validate the range, value, etc. of all parsed parameters. As such, don’t call this unless the parameters have already been parsed.

Returns:

TRUE if all parameters are valid, FALSE otherwise.

Protected Functions

virtual const base_config *config_get_impl(void) const = 0

Implementation (back end) of how to get the results of a parameter parse using covariance. This is to make parameter parsing easy when you only have a handle on THIS class, even if the object is actually a derived class parameter parser.