An array of Value interfaces. More...

#include <TextInterfaceParser.h>

Inheritance diagram for TextInterface::Parser:
Reference::Able Reference::HeapTracked TextInterface::To< C > TextInterface::To< child > TextInterface::To< container > TextInterface::To< extension > TextInterface::To< RobustEstimateZapper > TextInterface::To< tester > TextInterface::To< vector_of_Estimates >

Public Member Functions

 Parser ()
 Default constructor.
 
 ~Parser ()
 Destructor.
 
std::string get_value (const std::string &name) const
 Get the named value. More...
 
std::string get_name_value (std::string &name) const
 Get the named value and update name for display purposes. More...
 
void set_value (const std::string &name, const std::string &value)
 Set the named value. More...
 
Valuefind (const std::string &name, bool throw_exception=true) const
 Find the named value. More...
 
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.
 
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. More...
 
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.
 
virtual std::string get_interface_name () const
 Get the name of this interface.
 
virtual std::string get_interface_description () const
 Get a short description of this interface.
 
void set_indentation (const std::string &indent)
 Set the indentation that precedes the output of a call to process.
 
std::string get_indentation () const
 
void set_delimiter (const std::string &)
 Set the delimiter used to separate the elements of a container.
 
std::string get_delimiter () const
 
void set_prefix_name (bool flag)
 Prefix output with "name=".
 
void set_aliases (const Alias *alias)
 Set aliases for value names.
 
void insert (Parser *)
 Insert Parser into self. More...
 
void insert (const std::string &prefix, Parser *)
 Import a nested interface. More...
 
void clean ()
 Clear all nested interfaces.
 
- Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 
 Able (const Able &)
 Copy constructor.
 
Ableoperator= (const Able &)
 Assignment operator.
 
virtual ~Able ()
 Destructor.
 
unsigned get_reference_count () const
 Returns the number of references there are to this.
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 
 HeapTracked (const HeapTracked &)
 Copy constructor.
 
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
 
virtual ~HeapTracked ()
 Destructor.
 
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.
 

Protected Member Functions

void add_value (Value *value)
 Add a new value interface.
 
void remove (const std::string &name)
 Remove the named value interface.
 
void clean_invalid ()
 Clean up invalid references in values vector.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object. More...
 
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object. More...
 

Protected Attributes

std::string indentation
 The indentation that precedes the output of a call to process.
 
std::string delimiter
 The delimiter used to separate the elements of a container.
 
bool alphabetical
 Maintain alphabetical order of parameter names.
 
bool import_filter
 Filter duplicate value names during import.
 
bool prefix_name
 Prefix "name=" when retrieving a value.
 
Reference::To< const Aliasaliases
 The aliases for the value names.
 
std::vector< Reference::To< Value > > values
 The vector of values.
 
std::vector< Reference::To< Parser > > inserted
 Any inserted Parser is owned by this.
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
 
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
 
static void operator delete (void *location)
 Regular delete overload.
 
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.
 

Detailed Description

An array of Value interfaces.

Member Function Documentation

◆ find()

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

Find the named value.

Return a pointer to the named class value interface.

References get_name().

◆ get_name_value()

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

Get the named value and update name for display purposes.

Get the value of the value.

References TextInterface::Value::get_value(), TextInterface::Value::reset_modifiers(), and TextInterface::Value::set_modifiers().

◆ get_value() [1/2]

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

Get the named value.

Get the value of the value.

Referenced by get_value(), and TextIndex::set_container().

◆ get_value() [2/2]

string TextInterface::Parser::get_value ( unsigned  i) const

Get the value.

Get the name of the value.

References get_value().

◆ insert() [1/2]

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

Import a nested interface.

The Parser becomes owned by this

References TextInterface::Value::get_name(), setup(), and values.

◆ insert() [2/2]

void TextInterface::Parser::insert ( Parser other)

Insert Parser into self.

Insert the interface into self.

The Parser becomes owned by this

References setup(), and values.

◆ set_value()

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

Set the named value.

Set the value of the value.


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

Generated using doxygen 1.8.17