#include <creaImageIOTreeNode.h>
#include <creaImageIOTree.h>
#include <creaImageIOSystem.h>
-#include <creaMessageManager.h>
#include <algorithm>
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)
+ {
+
+ if(a->GetKey()==k)
+ {
+ return *a;
+ }
+
+ }
+ return *a;
+ }
//=============================================================
//=============================================================
void Node::Print() const
{
std::string mess;
- for (int i = 0; i<GetLevel(); ++i) mess += " ";
- mess += "|--" + GetLabel();
+ 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();
}
}
//=============================================================