TextInterface::MapOfProxy< M, K, E, Get > Class Template Reference

Proxy enables attribute interface of elements in a map. More...

#include <TextInterfaceProxy.h>

Inheritance diagram for TextInterface::MapOfProxy< M, K, E, Get >:
TextInterface::AttributeAdapter< M, E > TextInterface::AdapterBase< Attribute< M >, Attribute< E > > TextInterface::Attribute< M > TextInterface::Value Reference::Able Reference::HeapTracked

Public Member Functions

 MapOfProxy (const std::string &pre, const Attribute< E > *pa, Get g)
 Construct from a pointer to parent class attribute interface.
 
 MapOfProxy (const MapOfProxy &copy)
 Copy constructor.
 
Attribute< M > * clone () const
 Set the prefix to be added before attribute name. More...
 
std::string get_name () const
 Get the name of the attribute.
 
std::string get_value (const M *ptr) const
 Get the value of the attribute.
 
void set_value (M *ptr, const std::string &value)
 Set the value of the attribute.
 
bool matches (const std::string &name) const
 Return true if the name argument matches.
 
- Public Member Functions inherited from TextInterface::AttributeAdapter< M, E >
void set_description (const std::string &description)
 Set the description of the attribute.
 
void set_detailed_description (const std::string &description)
 Set the detailed description of the attribute.
 
- Public Member Functions inherited from TextInterface::AdapterBase< Attribute< M >, Attribute< E > >
 AdapterBase (Attribute< E > *_value=0)
 
std::string get_name () const
 Get the name of the value.
 
std::string get_description () const
 Get the description of the value.
 
std::string get_detailed_description () const
 Set the detailed description of the value.
 
bool matches (const std::string &name) const
 
void set_parent (Parser *p)
 
void set_modifiers (const std::string &mods) const
 
void reset_modifiers () const
 
- Public Member Functions inherited from TextInterface::Attribute< M >
 Attribute ()
 Default constructor.
 
std::string get_value () const
 Get the value of the attribute.
 
void set_value (const std::string &value)
 Set the value of the attribute.
 
virtual Attributeclone () const=0
 Retun a newly constructed copy.
 
- 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 std::string get_value () const =0
 Get the value as text.
 
virtual std::string get_description () const =0
 Get the description of the value.
 
virtual std::string get_detailed_description () const
 Get the detailed description of the value.
 
virtual void reset_modifiers () const =0
 Reset any output stream modifiers.
 
- 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 get_indeces (std::vector< K > &keys, const std::string &param) const
 Worker function parses keys for get_value and set_value.
 
- 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

Get get
 Method of M that returns E*, given K.
 
std::string prefix
 The name of the map instance.
 
std::string range
 Range parsed from name during matches.
 
- Protected Attributes inherited from TextInterface::AdapterBase< Attribute< M >, Attribute< E > >
Reference::To< Attribute< E > > value
 The nested value.
 
- 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.
 
- Public Attributes inherited from TextInterface::Attribute< M >
Reference::To< M, false > instance
 Pointer to the instance from which attribute value will be obtained.
 

Detailed Description

template<class M, class K, class E, class Get>
class TextInterface::MapOfProxy< M, K, E, Get >

Proxy enables attribute interface of elements in a map.

In this template: M is a map of key K to element E; Get is the method of V that returns E* given K

Member Function Documentation

◆ clone()

template<class M , class K , class E , class Get >
Attribute<M>* TextInterface::MapOfProxy< M, K, E, Get >::clone ( ) const
inline

Set the prefix to be added before attribute name.

Retun a newly constructed copy

References TextInterface::MapOfProxy< M, K, E, Get >::prefix, and TextInterface::AdapterBase< Attribute< M >, Attribute< E > >::value.


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

Generated using doxygen 1.8.17