Tree::unTag
- Added a method for removing a tag.
This commit is contained in:
@@ -177,6 +177,20 @@ void Tree::tag (const std::string& tag)
|
||||
_tags.push_back (tag);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Tree::unTag (const std::string& tag)
|
||||
{
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = _tags.begin (); i != _tags.end (); ++i)
|
||||
{
|
||||
if (*i == tag)
|
||||
{
|
||||
_tags.erase (i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Tree::count () const
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
|
||||
bool hasTag (const std::string&) const;
|
||||
void tag (const std::string&);
|
||||
void unTag (const std::string&);
|
||||
|
||||
int count () const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user