TextInterface::Interpreter< I, Get, Set > Class Template Reference

Text interface to a text interpreter. More...

#include <TextInterfaceInterpreter.h>

Inheritance diagram for TextInterface::Interpreter< I, Get, Set >:
TextInterface::Value Reference::Able Reference::HeapTracked

Public Member Functions

 Interpreter (const std::string &_name, I *ptr, Get _get, Set _set)
 Set all attributes on construction.
std::string get_name () const
 Get the name of the value.
std::string get_value () const
 Get the value as text.
void set_value (const std::string &text)
 Set the value as text.
std::string get_description () const
 Get the description of the value.
void set_description (const std::string &text)
 Set the description of the value.
std::string get_detailed_description () const
 Get the detailed description of the value.
void set_detailed_description (const std::string &text)
 Set the detailed description of the value.
void set_modifiers (const std::string &modifiers) const
 Parse any modifiers that will alter the behaviour of the output stream.
void reset_modifiers () const
 Reset any output stream modifiers.
Public Member Functions inherited from TextInterface::Value
 Value ()
 Explicit default constructor required to delay definition of Reference::To<Parser>
 ~Value ()
 Explicit destructor required to delay definition of Reference::To<Parser>
virtual bool matches (const std::string &name) const
 Return true if the name argument matches the value name.
virtual void set_parent (Parser *p)
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 Attributes

std::string name
std::string description
std::string detailed_description
Reference::To< I > interpreter
Get get
Set set
Protected Attributes inherited from TextInterface::Value
Reference::To< Parser, false > parent
 The Parser composite in which this Value component is integrated.

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.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object.
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object.

Detailed Description

template<class I, class Get, class Set>
class TextInterface::Interpreter< I, Get, Set >

Text interface to a text interpreter.

In this template: I is a the interpreter class; Get is the method of I that returns a string; and Set is the method of I that accepts a string

Member Function Documentation

◆ get_description()

template<class I, class Get, class Set>
std::string TextInterface::Interpreter< I, Get, Set >::get_description ( ) const
inlinevirtual

Get the description of the value.

Implements TextInterface::Value.

◆ get_detailed_description()

template<class I, class Get, class Set>
std::string TextInterface::Interpreter< I, Get, Set >::get_detailed_description ( ) const
inlinevirtual

Get the detailed description of the value.

Reimplemented from TextInterface::Value.

◆ get_name()

template<class I, class Get, class Set>
std::string TextInterface::Interpreter< I, Get, Set >::get_name ( ) const
inlinevirtual

Get the name of the value.

Implements TextInterface::Value.

◆ get_value()

template<class I, class Get, class Set>
std::string TextInterface::Interpreter< I, Get, Set >::get_value ( ) const
inlinevirtual

Get the value as text.

Implements TextInterface::Value.

◆ reset_modifiers()

template<class I, class Get, class Set>
void TextInterface::Interpreter< I, Get, Set >::reset_modifiers ( ) const
inlinevirtual

Reset any output stream modifiers.

Implements TextInterface::Value.

◆ set_modifiers()

template<class I, class Get, class Set>
void TextInterface::Interpreter< I, Get, Set >::set_modifiers ( const std::string & modifiers) const
inlinevirtual

Parse any modifiers that will alter the behaviour of the output stream.

Implements TextInterface::Value.

◆ set_value()

template<class I, class Get, class Set>
void TextInterface::Interpreter< I, Get, Set >::set_value ( const std::string & text)
inlinevirtual

Set the value as text.

Implements TextInterface::Value.


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

Generated using doxygen 1.14.0