12 #ifndef __TextInterfaceAdapter_h
13 #define __TextInterfaceAdapter_h
15 namespace TextInterface
20 template< class IsA, class HasA = IsA>
21 class AdapterBase : public IsA
25 AdapterBase (HasA* _value = 0) { value = _value; }
29 { return value->get_name(); }
33 { return value->get_description(); }
37 { return value->get_detailed_description (); }
39 bool matches ( const std::string& name) const
40 { return value->matches (name); }
43 { IsA::set_parent(p); value->set_parent(p); }
45 void set_modifiers ( const std::string& mods) const
46 { value->set_modifiers (mods); }
48 void reset_modifiers () const
49 { value->reset_modifiers(); }
59 template< class IsA, class HasA = IsA>
60 class ValueAdapter : public AdapterBase<IsA,HasA>
64 ValueAdapter (HasA* _value = 0) : AdapterBase<IsA,HasA> (_value) { }
67 std::string get_value () const
68 { return this->value->get_value (); }
71 void set_value ( const std::string& val)
72 { this->value->set_value (val); }
76 template< class IsA, class HasA = IsA>
77 class AttributeAdapter
78 : public AdapterBase< Attribute<IsA>, Attribute<HasA> >
Base class of Value adapters. Definition: TextInterfaceAdapter.h:26
void set_description(const std::string &description) Set the description of the attribute. Definition: TextInterfaceAdapter.h:88
virtual void set_description(const std::string &)=0 Set the description of the value.
std::string get_description() const Get the description of the value. Definition: TextInterfaceAdapter.h:42
An array of Value interfaces. Definition: TextInterfaceParser.h:35
Template class manages Reference::Able objects. Definition: Reference.h:74
std::string get_name() const Get the name of the value. Definition: TextInterfaceAdapter.h:38
Reference::To< HasA > value The nested value. Definition: TextInterfaceAdapter.h:64
std::string get_detailed_description() const Set the detailed description of the value. Definition: TextInterfaceAdapter.h:46
void set_detailed_description(const std::string &description) Set the detailed description of the attribute. Definition: TextInterfaceAdapter.h:92
virtual void set_detailed_description(const std::string &)=0 Set the detailed description of the value.
Generated using doxygen 1.8.17
|