diff --git a/include/Tree/tree.hpp b/include/Tree/tree.hpp index 16171b2..e373f44 100644 --- a/include/Tree/tree.hpp +++ b/include/Tree/tree.hpp @@ -194,6 +194,15 @@ namespace Tree void addChildren(Iter begin, Iter end) { std::copy( begin, end, std::back_inserter( children ) );} + /** + * @brief prepends a container of nodes to the list of children + * + * @param begin - iterator to the beginning of the container of objects of type std::shared_ptr + * @param end - iterator to the end of the container of objects of type std::shared_ptr + */ + template + void prependChildren(Iter begin, Iter end) { std::copy( begin, end, std::front_inserter( children ) );} + /** * @brief finds the next node in the tree of a given type *