]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeNode.h
*** empty log message ***
[creaImageIO.git] / src2 / creaImageIOTreeNode.h
index 07b46cfb20efe18230ecf071bd23697ed205df90..a97925ec05b5b4e4f25493c29737b5847e4399d7 100644 (file)
@@ -31,8 +31,13 @@ namespace creaImageIO
     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();
 
@@ -73,7 +78,6 @@ namespace creaImageIO
       /// 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; }
@@ -90,7 +94,9 @@ namespace creaImageIO
       //      { 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; }