| 41 | } |
| 42 | |
| 43 | std::string BindingTree::getNodePath() const |
| 44 | { |
| 45 | std::vector<std::string> parentChain; |
| 46 | BindingTree* currentParent = m_parent; |
| 47 | if (currentParent != nullptr) |
| 48 | { |
| 49 | while (currentParent != nullptr) |
| 50 | { |
| 51 | parentChain.push_back(currentParent->getId()); |
| 52 | currentParent = currentParent->m_parent; |
| 53 | } |
| 54 | parentChain.pop_back(); |
| 55 | reverse(parentChain.begin(), parentChain.end()); |
| 56 | parentChain.push_back(m_id); |
| 57 | std::string retPath = Utils::Vector::join(parentChain, "."); |
| 58 | return retPath; |
| 59 | } |
| 60 | else |
| 61 | { |
| 62 | return m_id; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | BindingTree& BindingTree::operator[](const std::string& id) |
| 67 | { |