]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeNode.cpp
Order by columns is done. For the moment it only compares as if everything were a...
[creaImageIO.git] / src2 / creaImageIOTreeNode.cpp
index 6814203c004a77816090003b0bbeffde5ed4ab10..09c89dcadb223442b82b474976708c9b4569c1bd 100644 (file)
@@ -106,6 +106,30 @@ namespace creaImageIO
     { 
       return GetTree()->GetLevelDescriptor(GetLevel()); 
     }
+
+       //=============================================================
+
+    //=============================================================
+    /// Returns the attribute descriptor of the passed parameter
+       const AttributeDescriptor& Node::GetAttributeDescriptor(const std::string& k)const
+       {
+               LevelDescriptor::AttributeDescriptorListType::const_iterator a;
+      for (a = GetTree()->GetAttributeDescriptorList(GetLevel()).begin();
+          a!= GetTree()->GetAttributeDescriptorList(GetLevel()).end();
+          ++a)
+               {
+                       GimmickMessage(1,"Hello my type is"<<a->GetType()<<std::endl);
+                       GimmickMessage(1,"Hello my group is"<<a->GetGroup()<<std::endl);
+                       GimmickMessage(1,"Hello my element is"<<a->GetElement()<<std::endl);
+                       
+                       if(a->GetKey()==k)
+                       {
+                               return *a;
+                       }
+               
+               }
+               return *a;
+       }
     //=============================================================
 
     //=============================================================
@@ -180,10 +204,10 @@ namespace creaImageIO
       for (int i = 0; i<GetLevel(); ++i) mess += "  ";
       mess += "|_ " + GetLabel();
       GimmickMessage(1,mess<<std::endl);
-      ChildrenListType::const_iterator i;
-      for (i=GetChildrenList().begin(); i!=GetChildrenList().end(); i++)
+      ChildrenListType::const_iterator j;
+      for (j=GetChildrenList().begin(); j!=GetChildrenList().end(); j++)
        {
-         (*i)->Print();
+         (*j)->Print();
        } 
     }
     //=============================================================