|
Adobe Source Libraries 2.0.6
A collection of C++ libraries.
|
A homogeneous hierarchical structure class. More...
#include <adobe/forest.hpp>
Public Types | |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef implementation::forest_iterator< T > | iterator |
| typedef implementation::forest_const_iterator< T > | const_iterator |
| typedef std::size_t | size_type |
| typedef std::ptrdiff_t | difference_type |
| typedef T | value_type |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef reverse_fullorder_iterator< iterator > | reverse_iterator |
| typedef reverse_fullorder_iterator< const_iterator > | const_reverse_iterator |
| typedef adobe::child_iterator< iterator > | child_iterator |
| typedef adobe::child_iterator< const_iterator > | const_child_iterator |
| typedef std::reverse_iterator< child_iterator > | reverse_child_iterator |
| typedef edge_iterator< iterator, forest_leading_edge > | preorder_iterator |
| typedef edge_iterator< const_iterator, forest_leading_edge > | const_preorder_iterator |
| typedef edge_iterator< iterator, forest_trailing_edge > | postorder_iterator |
| typedef edge_iterator< const_iterator, forest_trailing_edge > | const_postorder_iterator |
Friends | |
| class | child_adaptor< forest< T > > |
| struct | unsafe::set_next_fn< iterator > |
Related Symbols | |
(Note that these are not member symbols.) | |
| void | pivot (I &iter) |
| I | pivot_of (I iter) |
| C | trailing_of (C cursor) |
| C | leading_of (C cursor) |
| bool | has_children (const C &cursor) |
| ForestTraveler | find_parent (ForestTraveler traveler) |
| child_iterator< BeadIterator > | child_begin (const BeadIterator &iter) |
| child_iterator< BeadIterator > | child_end (const BeadIterator &iter) |
| template<typename R, typename P> | |
| auto | filter_fullorder_range (R &x, P p) -> boost::iterator_range< filter_fullorder_iterator< typename boost::range_iterator< R >::type, P > > |
| template<typename R, typename P> | |
| auto | filter_fullorder_range (const R &x, P p) -> boost::iterator_range< filter_fullorder_iterator< typename boost::range_const_iterator< R >::type, P > > |
| template<typename R> | |
| auto | reverse_fullorder_range (R &x) -> boost::iterator_range< reverse_fullorder_iterator< typename boost::range_iterator< R >::type > > |
| template<typename R> | |
| boost::iterator_range< reverse_fullorder_iterator< typename boost::range_const_iterator< R >::type > > | reverse_fullorder_range (const R &x) |
| template<typename R> | |
| boost::iterator_range< depth_fullorder_iterator< typename boost::range_iterator< R >::type > > | depth_range (R &x) |
| template<typename R> | |
| boost::iterator_range< depth_fullorder_iterator< typename boost::range_const_iterator< R >::type > > | depth_range (const R &x) |
| template<typename R> | |
| boost::iterator_range< edge_iterator< typename boost::range_iterator< R >::type, forest_trailing_edge > > | postorder_range (R &x) |
| template<typename R> | |
| boost::iterator_range< edge_iterator< typename boost::range_const_iterator< R >::type, forest_trailing_edge > > | postorder_range (const R &x) |
| template<typename R> | |
| boost::iterator_range< edge_iterator< typename boost::range_iterator< R >::type, forest_leading_edge > > | preorder_range (R &x) |
| template<typename R> | |
| boost::iterator_range< edge_iterator< typename boost::range_const_iterator< R >::type, forest_leading_edge > > | preorder_range (const R &x) |
| template<typename SourceForestIterType, typename DestForestType, typename UnaryFunction> | |
| void | transform_forest (SourceForestIterType first, SourceForestIterType last, DestForestType &destForest, typename DestForestType::iterator destIter, UnaryFunction transformFunc) |
| template<typename SourceForestIterType, typename DestForestType, typename UnaryFunction> | |
| void | transform_forest (SourceForestIterType first, SourceForestIterType last, DestForestType &destForest, UnaryFunction transformFunc) |
| template<typename SourceForestType, typename DestForestType, typename UnaryFunction> | |
| void | transform_forest (SourceForestType sourceForest, DestForestType &destForest, typename DestForestType::iterator destIter, UnaryFunction transformFunc) |
| template<typename SourceForestType, typename DestForestType, typename UnaryFunction> | |
| void | transform_forest (SourceForestType sourceForest, DestForestType &destForest, UnaryFunction transformFunc) |
forest is a linked structure, similiar to a list forming a number of hierarchies or trees. A forest can be traversed as a sequence, depth first, either pre-order or post-order, both forward and backward. Elements can be inserted and erased from any location in constant time. Inserting and splicing do not invalidate iterators to forest elements; erasing invalidates only the iterators that point to the elements that are erased. *(cursor) == *(cursor + 1) may be true. (e.g, in the case when the cursor pivots but does not move off the current forest node to which it points.)Definition at line 555 of file forest.hpp.
| typedef T& reference |
Definition at line 562 of file forest.hpp.
| typedef const T& const_reference |
Definition at line 563 of file forest.hpp.
| typedef implementation::forest_iterator<T> iterator |
Definition at line 564 of file forest.hpp.
| typedef implementation::forest_const_iterator<T> const_iterator |
Definition at line 565 of file forest.hpp.
| typedef std::size_t size_type |
Definition at line 566 of file forest.hpp.
| typedef std::ptrdiff_t difference_type |
Definition at line 567 of file forest.hpp.
| typedef T value_type |
Definition at line 568 of file forest.hpp.
| typedef T* pointer |
Definition at line 569 of file forest.hpp.
| typedef const T* const_pointer |
Definition at line 570 of file forest.hpp.
| typedef reverse_fullorder_iterator<iterator> reverse_iterator |
Definition at line 571 of file forest.hpp.
| typedef reverse_fullorder_iterator<const_iterator> const_reverse_iterator |
Definition at line 572 of file forest.hpp.
| typedef adobe::child_iterator<iterator> child_iterator |
Definition at line 574 of file forest.hpp.
| typedef adobe::child_iterator<const_iterator> const_child_iterator |
Definition at line 579 of file forest.hpp.
| typedef std::reverse_iterator<child_iterator> reverse_child_iterator |
Definition at line 580 of file forest.hpp.
| typedef edge_iterator<iterator, forest_leading_edge> preorder_iterator |
Definition at line 582 of file forest.hpp.
| typedef edge_iterator<const_iterator, forest_leading_edge> const_preorder_iterator |
Definition at line 583 of file forest.hpp.
| typedef edge_iterator<iterator, forest_trailing_edge> postorder_iterator |
Definition at line 584 of file forest.hpp.
| typedef edge_iterator<const_iterator, forest_trailing_edge> const_postorder_iterator |
Definition at line 585 of file forest.hpp.
|
default |
| ~forest | ( | ) |
Definition at line 589 of file forest.hpp.
| forest | ( | const forest< T > & | x | ) |
Definition at line 746 of file forest.hpp.
|
noexcept |
Definition at line 753 of file forest.hpp.
Definition at line 593 of file forest.hpp.
Definition at line 598 of file forest.hpp.
| void swap | ( | forest< T > & | x | ) |
Definition at line 760 of file forest.hpp.
| forest< T >::size_type size | ( | ) | const |
Definition at line 769 of file forest.hpp.
| size_type max_size | ( | ) | const |
Definition at line 608 of file forest.hpp.
| bool size_valid | ( | ) | const |
Definition at line 609 of file forest.hpp.
| bool empty | ( | ) | const |
Definition at line 610 of file forest.hpp.
| iterator root | ( | ) |
Definition at line 613 of file forest.hpp.
| const_iterator root | ( | ) | const |
Definition at line 614 of file forest.hpp.
| iterator begin | ( | ) |
Definition at line 616 of file forest.hpp.
| iterator end | ( | ) |
Definition at line 617 of file forest.hpp.
| const_iterator begin | ( | ) | const |
Definition at line 618 of file forest.hpp.
| const_iterator end | ( | ) | const |
Definition at line 619 of file forest.hpp.
| reverse_iterator rbegin | ( | ) |
Definition at line 621 of file forest.hpp.
| reverse_iterator rend | ( | ) |
Definition at line 622 of file forest.hpp.
| const_reverse_iterator rbegin | ( | ) | const |
Definition at line 623 of file forest.hpp.
| const_reverse_iterator rend | ( | ) | const |
Definition at line 624 of file forest.hpp.
| reference front | ( | ) |
Definition at line 626 of file forest.hpp.
| const_reference front | ( | ) | const |
Definition at line 630 of file forest.hpp.
| reference back | ( | ) |
Definition at line 634 of file forest.hpp.
| const_reference back | ( | ) | const |
Definition at line 638 of file forest.hpp.
| void clear | ( | ) |
Definition at line 644 of file forest.hpp.
| forest< T >::iterator erase | ( | const iterator & | position | ) |
| position | an iterator to the node to be erased. |
Definition at line 805 of file forest.hpp.
| forest< T >::iterator erase | ( | const iterator & | first, |
| const iterator & | last ) |
This only erases nodes if the deletion iterator passes through the node twice. See the description below on deleting a node for a more illustrative example of range-based node deletion.
| first | an iterator to the first node to be erased. |
| last | an iterator to one-past-the last node to be erased. |
Definition at line 783 of file forest.hpp.
| position | an iterator to the position of insertion. |
| x | a value to be copy-constructed into position. |
Definition at line 652 of file forest.hpp.
| void push_front | ( | const T & | x | ) |
Definition at line 664 of file forest.hpp.
| void push_back | ( | const T & | x | ) |
Definition at line 665 of file forest.hpp.
| void pop_front | ( | ) |
Definition at line 666 of file forest.hpp.
| void pop_back | ( | ) |
Definition at line 670 of file forest.hpp.
| forest< T >::iterator insert | ( | iterator | position, |
| const_child_iterator | first, | ||
| const_child_iterator | last ) |
Inserts the sub-forest [first.base(), last.base()) at position.
| position | an iterator to the position of insertion. |
| first | an iterator to the beginning of the range to be inserted |
| last | an iterator to the end of the range to be inserted |
Definition at line 851 of file forest.hpp.
| forest< T >::iterator splice | ( | iterator | position, |
| forest< T > & | x ) |
All of the elements of x are inserted before position and removed from x.
position must be a valid iterator in *this x must be a forest that is distinct from *this. x or position if x is empty. Definition at line 835 of file forest.hpp.
| forest< T >::iterator splice | ( | iterator | position, |
| forest< T > & | x, | ||
| iterator | i ) |
splice moves the element(s) pointed to by i from x to *this, inserting it before position. The range denoted by i is [leading_of(i), next(trailing_of(i)) ), any children of i are also moved. If position == leading_of(i) then no splice occurs.
position may not be within the range denoted by i. &x != *this and i has children then size() and x.size() will be invalidated. leading_of(i)). Definition at line 843 of file forest.hpp.
| forest< T >::iterator splice | ( | iterator | position, |
| forest< T > & | x, | ||
| child_iterator | first, | ||
| child_iterator | last ) |
splice moves the elements in [first, last) from x to *this, inserting them before position. If position == first.base() then no splice occurs.
position my not be within the range [first, last). &x != *this and [first, last) is not empty then size() and x.size() will be invalidated. first or position if [first, last) is empty. Definition at line 894 of file forest.hpp.
| forest< T >::iterator splice | ( | iterator | position, |
| forest< T > & | x, | ||
| child_iterator | first, | ||
| child_iterator | last, | ||
| size_type | count ) |
splice moves the elements in [first, last) from x to *this, inserting them before position. If position == first.base() then no splice occurs. The count parameter optionally specifies the distance [first, last) and avoids invalidating the size of the forests.
position my not be within the range [first, last). count is the distance from [first, last) or 0. &x != *this and [first, last) is not empty then size() and x.size() will be invalidated. first or position if [first, last) is empty. Definition at line 864 of file forest.hpp.
| forest< T >::iterator insert_parent | ( | child_iterator | first, |
| child_iterator | last, | ||
| const T & | x ) |
last must be arriveable at from first.Definition at line 902 of file forest.hpp.
| void reverse | ( | child_iterator | first, |
| child_iterator | last ) |
Definition at line 914 of file forest.hpp.
|
friend |
Definition at line 557 of file forest.hpp.
|
friend |
Definition at line 684 of file forest.hpp.
|
| iter | the iterator whose edge will be flipped |
Pivots the iterator from the leading to the trailing edge, or vice versa. The iterator itself is mutated to reflect the change.
Definition at line 44 of file forest.hpp.
|
Pivots the iterator from the leading to the trailing edge, or vice versa.
| iter | the iterator whose edge will be flipped |
Definition at line 49 of file forest.hpp.
|
| cursor | the cursor whose edge will be examined |
|
| cursor | the cursor whose edge will be examined |
|
| cursor | The cursor that whose node will be examined for children |
|
| traveler | an iterator over a given forest. |
traveler or forest end.[traveler, last_sibling).traveler is dereferenceable (not forest end).traveler. This would rely on a "check root" for travelers.
|
|
|
| x | the FullorderRange to which the filter will be applied |
| p | the predicate to be applied to the FullorderIterator |
Definition at line 991 of file forest.hpp.
|
| x | the const FullorderRange to which the filter will be applied |
| p | the predicate to be applied to value_type(R) |
Definition at line 1009 of file forest.hpp.
|
| x | the FullorderRange which will be reversed |
Definition at line 1039 of file forest.hpp.
|
| x | the const FullorderRange which will be reversed |
Definition at line 1058 of file forest.hpp.
|
| x | the FullorderRange which will be made into a depth FullorderRange |
Definition at line 1078 of file forest.hpp.
|
| x | the const FullorderRange which will be made into a const depth FullorderRange |
Definition at line 1096 of file forest.hpp.
|
| x | the FullorderRange which will be made into a postorder range |
Definition at line 1116 of file forest.hpp.
|
| x | the const FullorderRange which will be made into a const postorder range |
Definition at line 1134 of file forest.hpp.
|
| x | the FullorderRange which will be made into a preorder range |
Definition at line 1155 of file forest.hpp.
|
| x | the const FullorderRange which will be made into a const preorder range |
Definition at line 1173 of file forest.hpp.
|
Transforms the elements in [first, last) with transformFunc and insert into destForest at destIter.
| first | iterator to the beginning of the range to be transformed |
| last | iterator to one-past the last element of the range to be transformed |
| destForest | forest that the transformed elements should be inserted into |
| destIter | iterator to the location in destForest where the transformed elements should be inserted |
| transformFunc | function for transforming elements in the range |
Definition at line 1198 of file forest.hpp.
|
Transforms the elements in [first, last) with transformFunc and insert at the end of destForest.
| first | iterator to the beginning of the range to be transformed |
| last | iterator to one-past the last element of the range to be transformed |
| destForest | forest that the transformed elements should be inserted into |
| transformFunc | function for transforming elements in the range |
Definition at line 1233 of file forest.hpp.
|
Transforms the elements in sourceForest with transformFunc and insert into destForest at destIter.
| sourceForest | forest containing the elements to be transformed |
| destForest | forest that the transformed elements should be inserted into |
| destIter | iterator to the location in destForest where the transformed elements should be inserted |
| transformFunc | function for transforming elements in the range |
Definition at line 1253 of file forest.hpp.
|
Transforms the elements in sourceForest with transformFunc and insert at the end of destForest.
| sourceForest | forest containing the elements to be transformed |
| destForest | forest that the transformed elements should be inserted into |
| transformFunc | function for transforming elements in the range |
Definition at line 1272 of file forest.hpp.