class Node
{
public:
+ typedef std::map<std::string,std::string> AttributeMapType;
+
+
/// Ctor with parent
Node(Node* parent);
+ /// Ctor with parent and attributes map
+ Node(Node* parent, const AttributeMapType& );
/// Virtual destructor
virtual ~Node();
/// Remove the given children from the children list
void RemoveChildrenFromList(Node*);
- typedef std::map<std::string,std::string> AttributeMapType;
AttributeMapType& GetAttributeMap() { return mAttributeMap; }
const AttributeMapType& GetAttributeMap() const { return mAttributeMap; }
// { return GetTypeDescription().GetFieldDescription(k); }
-
+ /// Returns true iff the KEY attributes of the node match those of the map provided
+ bool Matches( const AttributeMapType& ) const;
+
/// Returns the node data casted into the type T
template<class T> T GetData() const
{ if (mData!=0) return dynamic_cast<T>(mData); return 0; }