ADD: method to prepend a child
This commit is contained in:
parent
2850647c66
commit
cf58516daf
@ -194,6 +194,15 @@ namespace Tree
|
|||||||
void addChildren(Iter begin, Iter end) { std::copy( begin, end, std::back_inserter( children ) );}
|
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<Tree::BaseNode>
|
||||||
|
* @param end - iterator to the end of the container of objects of type std::shared_ptr<Tree::BaseNode>
|
||||||
|
*/
|
||||||
|
template <typename Iter>
|
||||||
|
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
|
* @brief finds the next node in the tree of a given type
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user