]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeNode.h
Clean-Up with Juan Sebastien
[creaImageIO.git] / src2 / creaImageIOTreeNode.h
index 91bda3786bbe93e6c06a0499ca161f371da2ee5b..55d6ab570b36a46c7adad26c00419fb0e5ccf284 100644 (file)
@@ -12,7 +12,7 @@ namespace creaImageIO
   namespace tree
   {
          /**
-       * \ingroup Model
+       * \ingroup Tree
        */
     //=====================================================================
     /// Forward declaration of Tree
@@ -81,25 +81,33 @@ namespace creaImageIO
       const ChildrenListType& GetChildrenList() const { return mChildren; }
 
       /// Remove the given children from the children list
-      void RemoveChildrenFromList(Node*);
-
+      int RemoveChildrenFromList(Node*);
 
+       
+         /// Get the Attributes Map
       AttributeMapType& GetAttributeMap() { return mAttributeMap; }
+
+         /// Get the Attributes Map
       const AttributeMapType& GetAttributeMap() const { return mAttributeMap; }
+
+         /// Get the Attribute for a specific key
       const std::string& GetAttribute(const std::string& k) const;
-      const std::string& GetCleanAttribute(const std::string& k) const;
-      const std::string& UnsafeGetAttribute(const std::string& k) const
-      { return mAttributeMap.find(k)->second; }
+      
+         /// Get the Attribute for a specific key without OS dependance (not implemented)
+         // TODO : backslash OS uniformity
+         const std::string& GetCleanAttribute(const std::string& k) const;
+
+         /// Set an Attribute for a specific key
       void SetAttribute(const std::string& k, const std::string& v);
+
+         /// Set an Attribute for a specific key(unsafe mode)
       void UnsafeSetAttribute(const std::string& k, const std::string& v)
       { mAttributeMap[k] = v; }
     
-      const AttributeDescriptor& GetAttributeDescriptor(const std::string& k)
-       const;
-      //      { return GetTypeDescription().GetFieldDescription(k); }
-
-
-      /// Returns true iff the KEY attributes of the node match those of the map provided
+         /// Get Descriptor for an Attribute
+      const AttributeDescriptor& GetAttributeDescriptor(const std::string& k)const;
+      
+      /// Returns true if 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
@@ -112,15 +120,12 @@ namespace creaImageIO
       /// Sorts the children of the node 
       void SortChildren(const LexicographicalComparator&);
 
-
+         /// Print the node
       virtual void Print() const;
+
+         /// Get the Label of the node
       std::string GetLabel() const;
-      /*
-       int ImageGetRows() const;
-       int ImageGetColumns() const;
-       int ImageGetFrames() const;
-       const std::string& ImageGetFullFileName() const { return UnsafeGetAttribute("FullFileName"); }
-      */
 
     private:
       /// The parent of the node