Signed-off-by: Hugo Beauzée-Luyssen <beauze.h@gmail.com>
delete(this->subNodes.at(i));
}
-const std::vector<Node*>& Node::getSubNodes () const
+const std::vector<Node*>& Node::getSubNodes () const
{
return this->subNodes;
}
this->name = name;
}
+bool Node::hasAttribute (const std::string& name)
+{
+ if(this->attributes.find(name) != this->attributes.end())
+ return true;
+
+ return false;
+}
const std::string& Node::getAttributeValue (const std::string& key) const
{
std::map<std::string, std::string>::const_iterator it = this->attributes.find( key );
void addSubNode (Node *node);
const std::string& getName () const;
void setName (const std::string& name);
+ bool hasAttribute (const std::string& name);
void addAttribute (const std::string& key, const std::string& value);
const std::string& getAttributeValue (const std::string& key) const;
std::vector<std::string> getAttributeKeys () const;