X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcreaDevManagerLib%2FmodelCDMIProjectTreeNode.cpp;h=8b076580636b29a0a9a715c5e7b0e9ae0b2639c5;hb=f5cd0d2ab363ef8d6fd89d547ace70ca31d2bf3e;hp=fb02b7134175771239231defaec764f14c20461f;hpb=df27aee30377cefdc3e33b4001b5afca1798b309;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMIProjectTreeNode.cpp b/lib/creaDevManagerLib/modelCDMIProjectTreeNode.cpp index fb02b71..8b07658 100644 --- a/lib/creaDevManagerLib/modelCDMIProjectTreeNode.cpp +++ b/lib/creaDevManagerLib/modelCDMIProjectTreeNode.cpp @@ -84,7 +84,7 @@ bool modelCDMIProjectTreeNode::CompareNodeItem(const modelCDMIProjectTreeNode* x return returnValue; } -const wxTreeItemId& modelCDMIProjectTreeNode::GetId() const +const wxCDMTreeItemId& modelCDMIProjectTreeNode::GetId() const { return this->id; } @@ -109,12 +109,30 @@ const int& modelCDMIProjectTreeNode::GetLevel() const return this->level; } +modelCDMIProjectTreeNode* modelCDMIProjectTreeNode::GetParent() const +{ + return this->parent; +} + +std::vector modelCDMIProjectTreeNode::GetParents() const +{ + std::vector family; + modelCDMIProjectTreeNode* someFamily = this->parent; + while(someFamily != NULL) + { + family.push_back(someFamily); + someFamily = someFamily->GetParent(); + } + return family; + +} + const std::vector& modelCDMIProjectTreeNode::GetChildren() const { return this->children; } -void modelCDMIProjectTreeNode::SetId(const wxTreeItemId& id) +void modelCDMIProjectTreeNode::SetId(const wxCDMTreeItemId& id) { this->id = id; }