CLI2: Added polymorphic ::attribute

This commit is contained in:
Paul Beckingham 2015-06-21 21:08:11 -04:00
parent 7c604cdb8f
commit b4b15c7f45
2 changed files with 8 additions and 0 deletions

View file

@ -126,6 +126,13 @@ void A2::attribute (const std::string& name, const std::string& value)
_attributes[name] = value;
}
////////////////////////////////////////////////////////////////////////////////
// Accessor for attributes.
void A2::attribute (const std::string& name, const int value)
{
_attributes[name] = format (value);
}
////////////////////////////////////////////////////////////////////////////////
// Accessor for attributes.
const std::string A2::attribute (const std::string& name) const

View file

@ -48,6 +48,7 @@ public:
void unTagAll ();
*/
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 dump () const;