Class TextInterface::Parser

class Parser : public Reference::Able

An array of Value interfaces.

Subclassed by TextInterface::To< C >

Public Functions

Parser()

Default constructor.

~Parser()

Destructor.

std::string get_value(const std::string &name) const

Get the named value.

std::string get_name_value(std::string &name) const

Get the named value and update name for display purposes.

void set_value(const std::string &name, const std::string &value)

Set the named value.

Value *find(const std::string &name, bool throw_exception = true) const

Find the named value.

bool found(const std::string &name) const

Return true if the named value is found.

bool found(const std::string &prefix, const std::string &name) const

Return true if prefix:name is found.

inline virtual void setup(const Value*)

Allow derived types to setup a Value instance before use.

unsigned get_nvalue() const

Get the number of values.

std::string get_name(unsigned) const

Get the name of the value.

std::string get_value(unsigned) const

Get the value.

std::string get_description(unsigned) const

Get the description of the value.

virtual std::string process(const std::string &command)

Process a command.

virtual std::string process(const std::vector<std::string> &commands)

Process a vector of commands.

virtual std::string help(bool show_default_values = false, bool show_header = false, const char *indent = 0)

Return the list of available values.

inline virtual std::string get_interface_name() const

Get the name of this interface.

inline virtual std::string get_interface_description() const

Get a short description of this interface.

inline void set_indentation(const std::string &indent)

Set the indentation that precedes the output of a call to process.

void set_delimiter(const std::string&)

Set the delimiter used to separate the elements of a container.

inline void set_prefix_name(bool flag)

Prefix output with “name=”.

inline void set_aliases(const Alias *alias)

Set aliases for value names.

void insert(Parser*)

Insert Parser into self.

The Parser becomes owned by this

void insert(const std::string &prefix, Parser*)

Import a nested interface.

The Parser becomes owned by this

void clean()

Clear all nested interfaces.