]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMIProjectTreeNode.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMIProjectTreeNode.cpp
index fb02b7134175771239231defaec764f14c20461f..e7edd2bcc80766b6e3fa01a1c529e55931074137 100644 (file)
@@ -109,6 +109,24 @@ const int& modelCDMIProjectTreeNode::GetLevel() const
   return this->level;
 }
 
+modelCDMIProjectTreeNode* modelCDMIProjectTreeNode::GetParent() const
+{
+  return this->parent;
+}
+
+std::vector<modelCDMIProjectTreeNode*> modelCDMIProjectTreeNode::GetParents() const
+{
+  std::vector<modelCDMIProjectTreeNode*> family;
+  modelCDMIProjectTreeNode* someFamily = this->parent;
+  while(someFamily != NULL)
+    {
+      family.push_back(someFamily);
+      someFamily = someFamily->GetParent();
+    }
+  return family;
+
+}
+
 const std::vector<modelCDMIProjectTreeNode*>& modelCDMIProjectTreeNode::GetChildren() const
 {
   return this->children;