|
Adobe Source Libraries 2.0.0
A collection of C++ libraries.
|
Utility class for indexing objects based on specific member variable values. More...
#include <table_index.hpp>
Public Types | |
| typedef std::vector< T * > | index_type |
| typedef Transform | transform_type |
| typedef Key | key_type |
| typedef T | value_type |
| typedef Compare | key_compare |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef index_type::size_type | size_type |
| typedef index_type::difference_type | difference_type |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef boost::indirect_iterator< typename index_type::iterator > | iterator |
| typedef boost::indirect_iterator< typename index_type::const_iterator > | const_iterator |
| typedef std::reverse_iterator< iterator > | reverse_iterator |
| typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Friends | |
| void | swap (table_index &x, table_index &y) |
Related Symbols | |
(Note that these are not member symbols.) | |
| void | swap (adobe::table_index &x, adobe::table_index &y) |
The table_index does not own the elements it indexes. Therefore the client is required to maintain the elements in the table_index as long as the table_index refers to them.
If the index is not sorted then the result of a lookup by key is undefined.
Definition at line 667 of file table_index.hpp.
| typedef std::vector<T*> index_type |
Container to store the elements of the table.
Definition at line 670 of file table_index.hpp.
| typedef Transform transform_type |
ConvertibleToFunction used to transform an element into a specific key.
Definition at line 671 of file table_index.hpp.
| typedef Key key_type |
The table_index's key type, Key.
Definition at line 673 of file table_index.hpp.
| typedef T value_type |
The type of object referenced by the table_index.
Definition at line 674 of file table_index.hpp.
| typedef Compare key_compare |
Functor that compares two keys for ordering.
Definition at line 675 of file table_index.hpp.
| typedef T& reference |
Reference to T.
Definition at line 677 of file table_index.hpp.
| typedef const T& const_reference |
Const reference to T.
Definition at line 678 of file table_index.hpp.
| typedef index_type::size_type size_type |
An unsigned integral type.
Definition at line 679 of file table_index.hpp.
| typedef index_type::difference_type difference_type |
A signed integral type.
Definition at line 680 of file table_index.hpp.
| typedef T* pointer |
Pointer to T.
Definition at line 681 of file table_index.hpp.
| typedef const T* const_pointer |
Const pointer to T.
Definition at line 682 of file table_index.hpp.
| typedef boost::indirect_iterator<typename index_type::iterator> iterator |
Iterator used to iterate through a table_index.
Definition at line 684 of file table_index.hpp.
| typedef boost::indirect_iterator<typename index_type::const_iterator> const_iterator |
Const iterator used to iterate through a table_index.
Definition at line 685 of file table_index.hpp.
| typedef std::reverse_iterator<iterator> reverse_iterator |
Iterator used to iterate backwards through a table_index.
Definition at line 686 of file table_index.hpp.
| typedef std::reverse_iterator<const_iterator> const_reverse_iterator |
Const iterator used to iterate backwards through a table_index.
Definition at line 687 of file table_index.hpp.
|
explicit |
| transform | ConvertibleToFunction to be converted to the transformation function for this index |
| compare | key comparison function for this index |
Definition at line 690 of file table_index.hpp.
|
explicit |
Constructs a table_index with the specified transformation function and key comparison function.
Definition at line 809 of file table_index.hpp.
| table_index | ( | InputIterator | first, |
| InputIterator | last, | ||
| TransformPrimitive | transform, | ||
| const key_compare & | compare = key_compare() ) |
Constructs a table_index by copying elements from a range.
| first | iterator to first element to populate the table |
| last | iterator to one-past-the-last element to populate the table |
| transform | transformation function for this index |
| compare | key comparison function for this index |
Definition at line 703 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::size_type max_size | ( | ) | const |
Definition at line 881 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::size_type size | ( | ) | const |
Definition at line 889 of file table_index.hpp.
| bool empty | ( | ) | const |
true if the table_index's size is 0. Definition at line 896 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator begin | ( | ) |
Definition at line 817 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_iterator begin | ( | ) | const |
Definition at line 825 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator end | ( | ) |
Definition at line 833 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_iterator end | ( | ) | const |
Definition at line 841 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::reverse_iterator rbegin | ( | ) |
Definition at line 849 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_reverse_iterator rbegin | ( | ) | const |
Definition at line 857 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::reverse_iterator rend | ( | ) |
Definition at line 865 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_reverse_iterator rend | ( | ) | const |
Definition at line 873 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_reference at | ( | size_type | n | ) | const |
Definition at line 993 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::reference at | ( | size_type | n | ) |
| n | index into the table. |
n in the table.const
n in the table. Definition at line 985 of file table_index.hpp.
| reference front | ( | ) |
| const_reference front | ( | ) | const |
| reference back | ( | ) |
| const_reference back | ( | ) | const |
| void push_back | ( | value_type & | x | ) |
| x | The element to insert at the end of the table |
x must exist as long as this table's reference to it exists. Definition at line 903 of file table_index.hpp.
| void pop_back | ( | ) |
Eliminates the last element from the table.
Definition at line 910 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator insert | ( | iterator | position, |
| value_type & | x ) |
| position | position at which the new element is to be inserted |
| x | The element to insert as the position specified |
x must exist as long as this table's reference to it exists. Definition at line 918 of file table_index.hpp.
| void insert | ( | iterator | position, |
| InputIterator | first, | ||
| InputIterator | last ) |
| position | position at which the new elements are to be inserted |
| first | Iterator to the first new element to be inserted |
| last | Iterator to one past the last new element to be inserted |
(first, last] must exist as long as this table's references to them exist. Definition at line 931 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator erase | ( | iterator | location | ) |
| location | iterator to the element to be removed from the index |
Definition at line 946 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator erase | ( | iterator | first, |
| iterator | last ) |
| first | Iterator to the first element to be erased from the index |
| last | Iterator to one past the last element to be erased from the index |
Definition at line 954 of file table_index.hpp.
| void clear | ( | ) |
Erases the entire table_index.
Definition at line 961 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::index_type & index | ( | ) |
std::vector Definition at line 1123 of file table_index.hpp.
| const table_index< Key, T, Compare, Transform >::index_type & index | ( | ) | const |
std::vector Definition at line 1131 of file table_index.hpp.
| void sort | ( | ) |
Sorts all the elements in the table based on their transformed values as compared with the key_compare function object.
Definition at line 968 of file table_index.hpp.
| void unique | ( | ) |
Reduces the index to a single value per key.
Definition at line 975 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::reference operator[] | ( | const key_type & | key | ) |
| key | key value to find in the table index. |
key. Definition at line 1001 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_reference operator[] | ( | const key_type & | key | ) | const |
| key | key value to find in the table index. |
key. Definition at line 1014 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator find | ( | const key_type & | x | ) |
| x | key value to find within the index |
x, or end() if there is none. Definition at line 1027 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_iterator find | ( | const key_type & | x | ) | const |
| x | key value to find within the index |
x, or end() if there is none. Definition at line 1040 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::size_type count | ( | const key_type & | x | ) | const |
const
| x | key value to count within the index |
x. Definition at line 1053 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator lower_bound | ( | const key_type & | x | ) |
| x | key value to find within the index |
x could be inserted without violating the ordering of the table. Definition at line 1061 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_iterator lower_bound | ( | const key_type & | x | ) | const |
| x | key value to find within the index |
x could be inserted without violating the ordering of the table. Definition at line 1071 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::iterator upper_bound | ( | const key_type & | x | ) |
| x | key value to find within the index |
x could be inserted without violating the ordering of the table. Definition at line 1081 of file table_index.hpp.
| table_index< Key, T, Compare, Transform >::const_iterator upper_bound | ( | const key_type & | x | ) | const |
| x | key value to find within the index |
x could be inserted without violating the ordering of the table. Definition at line 1091 of file table_index.hpp.
| std::pair< typename table_index< Key, T, Compare, Transform >::iterator, typename table_index< Key, T, Compare, Transform >::iterator > equal_range | ( | const key_type & | x | ) |
| x | key value to find within the index |
Definition at line 1102 of file table_index.hpp.
| std::pair< typename table_index< Key, T, Compare, Transform >::const_iterator, typename table_index< Key, T, Compare, Transform >::const_iterator > equal_range | ( | const key_type & | x | ) | const |
| x | key value to find within the index |
Definition at line 1113 of file table_index.hpp.
| transform_type transform | ( | ) | const |
Definition at line 774 of file table_index.hpp.
|
friend |
Definition at line 776 of file table_index.hpp.
|
Swaps the contents of two table_indexes.
| x | the first table_index to swap. |
| y | the second table_index to swap. |