]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeNode.h
Added creaImageIOGimmickView.h
[creaImageIO.git] / src2 / creaImageIOTreeNode.h
index 07b46cfb20efe18230ecf071bd23697ed205df90..2b18acd2ca1e8d3cb84fb6801ecef8ba24c73c79 100644 (file)
@@ -11,6 +11,9 @@ namespace creaImageIO
 
   namespace tree
   {
+         /**
+       * \ingroup Model
+       */
     //=====================================================================
     /// Forward declaration of Tree
     class Tree;
@@ -31,8 +34,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 +81,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 +97,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; }