diff --git a/alib2std/src/extensions/container/tree_base.hpp b/alib2std/src/extensions/container/tree_base.hpp index c4ae325cd3842c3a8633869825cb0fd7df793973..8667f0a8eb2bcb9e1a44ed8b6d066f4332b7ef7f 100644 --- a/alib2std/src/extensions/container/tree_base.hpp +++ b/alib2std/src/extensions/container/tree_base.hpp @@ -1058,6 +1058,30 @@ public: child.parent = static_cast < Cast * > ( this ); } + /** + * \brief + * Getter of the child at given index. + * + * \param index the index to retrieve + * + * \return reference to the child at given index + */ + Data & getChild ( int index ) { + return m_children [ index ]; + } + + /** + * \brief + * Getter of the child at given index. + * + * \param index the index to retrieve + * + * \return reference to the child at given index + */ + const Data & getChild ( int index ) const { + return m_children [ index ]; + } + /** * \brief * Setter of the single child of the node.