CLI: A2::unTag added

This commit is contained in:
Paul Beckingham 2016-04-02 13:58:14 -04:00
parent 91b943a26c
commit d799d553fc
2 changed files with 12 additions and 0 deletions

View file

@ -49,6 +49,17 @@ void A2::tag (const std::string& tag)
_tags.push_back (tag); _tags.push_back (tag);
} }
////////////////////////////////////////////////////////////////////////////////
void A2::unTag (const std::string& tag)
{
for (auto i = _tags.begin (); i != _tags.end (); ++i)
if (*i == tag)
{
_tags.erase (i);
break;
}
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Accessor for attributes. // Accessor for attributes.
void A2::attribute (const std::string& name, const std::string& value) void A2::attribute (const std::string& name, const std::string& value)

View file

@ -39,6 +39,7 @@ public:
A2 (const std::string&, Lexer::Type); A2 (const std::string&, Lexer::Type);
bool hasTag (const std::string&) const; bool hasTag (const std::string&) const;
void tag (const std::string&); void tag (const std::string&);
void unTag (const std::string&);
void attribute (const std::string&, const std::string&); void attribute (const std::string&, const std::string&);
public: public: