CLI2: Added polymorphic ::attribute
This commit is contained in:
@@ -126,6 +126,13 @@ void A2::attribute (const std::string& name, const std::string& value)
|
|||||||
_attributes[name] = value;
|
_attributes[name] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Accessor for attributes.
|
||||||
|
void A2::attribute (const std::string& name, const int value)
|
||||||
|
{
|
||||||
|
_attributes[name] = format (value);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Accessor for attributes.
|
// Accessor for attributes.
|
||||||
const std::string A2::attribute (const std::string& name) const
|
const std::string A2::attribute (const std::string& name) const
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public:
|
|||||||
void unTagAll ();
|
void unTagAll ();
|
||||||
*/
|
*/
|
||||||
void attribute (const std::string&, const std::string&);
|
void attribute (const std::string&, const std::string&);
|
||||||
|
void attribute (const std::string&, const int);
|
||||||
const std::string attribute (const std::string&) const;
|
const std::string attribute (const std::string&) const;
|
||||||
const std::string dump () const;
|
const std::string dump () const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user