Class TextInterface::MapOfProxy

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

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

Public Functions

inline MapOfProxy(const std::string &pre, const Attribute<E> *pa, Get g)

Construct from a pointer to parent class attribute interface.

inline MapOfProxy(const MapOfProxy &copy)

Copy constructor.

inline virtual Attribute<M> *clone() const

Set the prefix to be added before attribute name.

Retun a newly constructed copy

inline virtual 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.

virtual bool matches(const std::string &name) const

Return true if the name argument matches.