#include <genesis/tree/tree_set.hpp>
Definition at line 48 of file tree_set.hpp.
Public Member Functions | |
TreeSet ()=default | |
TreeSet (TreeSet &&)=default | |
TreeSet (TreeSet const &)=default | |
~TreeSet ()=default | |
void | add (Tree &&tree, std::string const &name="") |
Add a Tree with a name to the TreeSet. More... | |
void | add (Tree const &tree, std::string const &name="") |
Add a Tree with a name to the TreeSet. More... | |
Tree & | at (size_t index) |
Tree const & | at (size_t index) const |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
Clear the TreeSet and destroy all contained Trees. More... | |
bool | empty () const |
Return whether the TreeSet is empty. More... | |
iterator | end () |
const_iterator | end () const |
std::string const & | name_at (size_t index) const |
std::vector< std::string > const & | names () const |
operator std::vector< Tree > const & () const | |
Implicit conversion, so that a TreeSet can be used in functions that expect a std::vector instead. More... | |
TreeSet & | operator= (TreeSet &&)=default |
TreeSet & | operator= (TreeSet const &)=default |
Tree & | operator[] (const std::size_t index) |
Tree const & | operator[] (const std::size_t index) const |
void | remove_at (size_t index) |
Remove the Tree at a certain index position. More... | |
size_t | size () const |
Return the size of the TreeSet, i.e., the number of stored Trees. More... | |
void | swap (TreeSet &other) |
std::vector< Tree > const & | trees () const |
Public Types | |
using | const_iterator = typename std::vector< Tree >::const_iterator |
using | iterator = typename std::vector< Tree >::iterator |
|
default |
|
default |
|
inline |
Add a Tree with a name to the TreeSet.
The Tree is moved.
Definition at line 99 of file tree_set.hpp.
|
inline |
Add a Tree with a name to the TreeSet.
The Tree is copied.
Definition at line 88 of file tree_set.hpp.
|
inline |
Definition at line 178 of file tree_set.hpp.
|
inline |
Definition at line 183 of file tree_set.hpp.
|
inline |
Definition at line 158 of file tree_set.hpp.
|
inline |
Definition at line 163 of file tree_set.hpp.
|
inline |
Clear the TreeSet and destroy all contained Trees.
Definition at line 128 of file tree_set.hpp.
|
inline |
Return whether the TreeSet is empty.
Definition at line 219 of file tree_set.hpp.
|
inline |
Definition at line 168 of file tree_set.hpp.
|
inline |
Definition at line 173 of file tree_set.hpp.
|
inline |
Definition at line 138 of file tree_set.hpp.
|
inline |
Definition at line 149 of file tree_set.hpp.
|
inline |
Implicit conversion, so that a TreeSet can be used in functions that expect a std::vector
instead.
Definition at line 207 of file tree_set.hpp.
|
inline |
Definition at line 188 of file tree_set.hpp.
|
inline |
Definition at line 193 of file tree_set.hpp.
|
inline |
Remove the Tree at a certain index position.
As this function moves Trees in the container around, all iterators and pointers to the elements of this TreeSet are considered to be invalidated.
Definition at line 111 of file tree_set.hpp.
|
inline |
Return the size of the TreeSet, i.e., the number of stored Trees.
Definition at line 228 of file tree_set.hpp.
|
inline |
Definition at line 72 of file tree_set.hpp.
|
inline |
Definition at line 198 of file tree_set.hpp.
using const_iterator = typename std::vector<Tree>::const_iterator |
Definition at line 57 of file tree_set.hpp.
Definition at line 56 of file tree_set.hpp.