ldas-tools-framecpp
2.9.3
|
A searchable container. More...
#include <SearchContainer.hh>
Public Member Functions | |
SearchContainer (bool AllowDuplicates=true) | |
Default Constructor. More... | |
SearchContainer (const SearchContainer< T, F > &sc) | |
Copy Constructor. More... | |
virtual | ~SearchContainer () |
Destructor. | |
const SearchContainer< T, F > & | operator= (const SearchContainer< T, F > &sc) |
Assignment Operator. More... | |
const_iterator | find (const std::string &name) const |
Finds an element with the given name. More... | |
const_iterator | find (const std::string &name, const_iterator start) const |
Finds an element with the given name. More... | |
iterator | find (const std::string &name) |
Finds an element with the given name. More... | |
iterator | find (const std::string &name, iterator start) |
Finds an element with the given name. More... | |
const_iterator | regexFind (const std::string ®ex) const |
Finds an element with a name matching the given regex. More... | |
const_iterator | regexFind (const std::string ®ex, const_iterator start) const |
Finds an element with a name matching the given regex. More... | |
iterator | regexFind (const std::string ®ex) |
Finds an element with a name matching the given regex. More... | |
iterator | regexFind (const std::string ®ex, iterator start) |
Finds an element with a name matching the given regex. More... | |
std::pair< const_hash_iterator, const_hash_iterator > | hashFind (const std::string &name) const |
Finds an element with the given name via a hash. More... | |
std::pair< hash_iterator, hash_iterator > | hashFind (const std::string &name) |
Finds an element with a the given name via a hash. More... | |
void | rehash () const |
Rehash search container. | |
iterator | append (value_type data) |
Append an item to the container. More... | |
iterator | insert (iterator pos, value_type data) |
Insert an item into the container. More... | |
iterator | insert (size_t index, const T &data) |
Insert an item into the container. More... | |
void | erase (unsigned int index) |
Remove an element from the container. More... | |
void | erase (iterator start, iterator finish) |
Remove a sequence of elements from the container. More... | |
SearchContainer (bool AllowDuplicates=true) | |
Default Constructor. More... | |
SearchContainer (const SearchContainer< T, F > &sc) | |
Copy Constructor. More... | |
virtual | ~SearchContainer () |
Destructor. | |
const SearchContainer< T, F > & | operator= (const SearchContainer< T, F > &sc) |
Assignment Operator. More... | |
const_iterator | find (const std::string &name) const |
Finds an element with the given name. More... | |
const_iterator | find (const std::string &name, const_iterator start) const |
Finds an element with the given name. More... | |
iterator | find (const std::string &name) |
Finds an element with the given name. More... | |
iterator | find (const std::string &name, iterator start) |
Finds an element with the given name. More... | |
const_iterator | regexFind (const std::string ®ex) const |
Finds an element with a name matching the given regex. More... | |
const_iterator | regexFind (const std::string ®ex, const_iterator start) const |
Finds an element with a name matching the given regex. More... | |
iterator | regexFind (const std::string ®ex) |
Finds an element with a name matching the given regex. More... | |
iterator | regexFind (const std::string ®ex, iterator start) |
Finds an element with a name matching the given regex. More... | |
std::pair< const_hash_iterator, const_hash_iterator > | hashFind (const std::string &name) const |
Finds an element with the given name via a hash. More... | |
std::pair< hash_iterator, hash_iterator > | hashFind (const std::string &name) |
Finds an element with a the given name via a hash. More... | |
void | rehash () const |
Rehash search container. | |
iterator | append (value_type data) |
Append an item to the container. More... | |
iterator | insert (iterator pos, value_type data) |
Insert an item into the container. More... | |
iterator | insert (size_t index, const T &data) |
Insert an item into the container. More... | |
void | erase (unsigned int index) |
Remove an element from the container. More... | |
void | erase (iterator start, iterator finish) |
Remove a sequence of elements from the container. More... | |
SearchContainer (bool AllowDuplicates=true) | |
Default Constructor. More... | |
SearchContainer (const SearchContainer< T, F > &sc) | |
Copy Constructor. More... | |
virtual | ~SearchContainer () |
Destructor. | |
const SearchContainer< T, F > & | operator= (const SearchContainer< T, F > &sc) |
Assignment Operator. More... | |
const_iterator | find (const std::string &name) const |
Finds an element with the given name. More... | |
const_iterator | find (const std::string &name, const_iterator start) const |
Finds an element with the given name. More... | |
iterator | find (const std::string &name) |
Finds an element with the given name. More... | |
iterator | find (const std::string &name, iterator start) |
Finds an element with the given name. More... | |
const_iterator | regexFind (const std::string ®ex) const |
Finds an element with a name matching the given regex. More... | |
const_iterator | regexFind (const std::string ®ex, const_iterator start) const |
Finds an element with a name matching the given regex. More... | |
iterator | regexFind (const std::string ®ex) |
Finds an element with a name matching the given regex. More... | |
iterator | regexFind (const std::string ®ex, iterator start) |
Finds an element with a name matching the given regex. More... | |
std::pair< const_hash_iterator, const_hash_iterator > | hashFind (const std::string &name) const |
Finds an element with the given name via a hash. More... | |
std::pair< hash_iterator, hash_iterator > | hashFind (const std::string &name) |
Finds an element with a the given name via a hash. More... | |
void | rehash () const |
Rehash search container. | |
iterator | append (value_type data) |
Append an item to the container. More... | |
iterator | insert (iterator pos, value_type data) |
Insert an item into the container. More... | |
iterator | insert (size_t index, const T &data) |
Insert an item into the container. More... | |
void | erase (unsigned int index) |
Remove an element from the container. More... | |
void | erase (iterator start, iterator finish) |
Remove a sequence of elements from the container. More... | |
bool | operator== (const Container< T > &c) const |
Equality operator. More... | |
bool | operator== (const Container< T > &c) const |
Equality operator. More... | |
bool | operator== (const Container< T > &c) const |
Equality operator. More... | |
bool | operator!= (const Container< T > &c) const |
Inequality operator. More... | |
bool | operator!= (const Container< T > &c) const |
Inequality operator. More... | |
bool | operator!= (const Container< T > &c) const |
Inequality operator. More... | |
A searchable container.
The SearchContainer class allows the user to find an element in the class based upon an attribute of the contained object. For this class, there are two template parameters:
T | The type of object to store. |
F | A constant method of class T returning a const string&. This is used to supply the attribute to query on. |
The SearchContainer class allows the user to find an element in the class based upon an attribute of the contained object. For this class, there are two template parameters:
T | The type of object to store. |
F | A constant method of class T returning a const string&. This is used to supply the attribute to query on. |
The SearchContainer class allows the user to find an element in the class based upon an attribute of the contained object. For this class, there are two template parameters:
T | The type of object to store. |
F | A constant method of class T returning a const string&. This is used to supply the attribute to query on. |
FrameCPP::Common::SearchContainer< T, F >::SearchContainer | ( | bool | AllowDuplicates = true | ) |
Default Constructor.
[in] | AllowDuplicates | True if duplicates are allowed in the set |
FrameCPP::Common::SearchContainer< T, F >::SearchContainer | ( | const SearchContainer< T, F > & | sc | ) |
Copy Constructor.
[in] | sc | Search container to be copied. |
FrameCPP::Common::SearchContainer< T, F >::SearchContainer | ( | bool | AllowDuplicates = true | ) |
Default Constructor.
[in] | AllowDuplicates | True if duplicates are allowed in the set |
FrameCPP::Common::SearchContainer< T, F >::SearchContainer | ( | const SearchContainer< T, F > & | sc | ) |
Copy Constructor.
[in] | sc | Search container to be copied. |
FrameCPP::Common::SearchContainer< T, F >::SearchContainer | ( | bool | AllowDuplicates = true | ) |
Default Constructor.
[in] | AllowDuplicates | True if duplicates are allowed in the set |
FrameCPP::Common::SearchContainer< T, F >::SearchContainer | ( | const SearchContainer< T, F > & | sc | ) |
Copy Constructor.
[in] | sc | Search container to be copied. |
|
inline |
Append an item to the container.
[in] | data | An element to append. |
|
inline |
Append an item to the container.
[in] | data | An element to append. |
|
inline |
Append an item to the container.
[in] | data | An element to append. |
void FrameCPP::Common::SearchContainer< T, F >::erase | ( | iterator | start, |
iterator | finish | ||
) |
Remove a sequence of elements from the container.
All owned elements in sequence will be destructed.
[in] | start | Sequence beginning. |
[in] | finish | Sequence end. |
void FrameCPP::Common::SearchContainer< T, F >::erase | ( | iterator | start, |
iterator | finish | ||
) |
Remove a sequence of elements from the container.
All owned elements in sequence will be destructed.
[in] | start | Sequence beginning. |
[in] | finish | Sequence end. |
void FrameCPP::Common::SearchContainer< T, F >::erase | ( | iterator | start, |
iterator | finish | ||
) |
Remove a sequence of elements from the container.
All owned elements in sequence will be destructed.
[in] | start | Sequence beginning. |
[in] | finish | Sequence end. |
void FrameCPP::Common::SearchContainer< T, F >::erase | ( | unsigned int | index | ) |
Remove an element from the container.
If the element is owned, then it will be destructed.
[in] | index | which element to erase. |
void FrameCPP::Common::SearchContainer< T, F >::erase | ( | unsigned int | index | ) |
Remove an element from the container.
If the element is owned, then it will be destructed.
[in] | index | which element to erase. |
void FrameCPP::Common::SearchContainer< T, F >::erase | ( | unsigned int | index | ) |
Remove an element from the container.
If the element is owned, then it will be destructed.
[in] | index | which element to erase. |
|
inline |
Finds an element with the given name.
[in] | name | Name to search for. |
iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name | ) |
Finds an element with the given name.
[in] | name | Name to search for. |
iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name | ) |
Finds an element with the given name.
[in] | name | Name to search for. |
|
inline |
Finds an element with the given name.
[in] | name | Name to search for. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name | ) | const |
Finds an element with the given name.
[in] | name | Name to search for. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name | ) | const |
Finds an element with the given name.
[in] | name | Name to search for. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name, |
const_iterator | start | ||
) | const |
Finds an element with the given name.
[in] | name | Name to search for. |
[in] | start | Starting position. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name, |
const_iterator | start | ||
) | const |
Finds an element with the given name.
[in] | name | Name to search for. |
[in] | start | Starting position. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name, |
const_iterator | start | ||
) | const |
Finds an element with the given name.
[in] | name | Name to search for. |
[in] | start | Starting position. |
iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name, |
iterator | start | ||
) |
Finds an element with the given name.
[in] | name | Name to search for. |
[in] | start | Where to begin search. |
iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name, |
iterator | start | ||
) |
Finds an element with the given name.
[in] | name | Name to search for. |
[in] | start | Where to begin search. |
iterator FrameCPP::Common::SearchContainer< T, F >::find | ( | const std::string & | name, |
iterator | start | ||
) |
Finds an element with the given name.
[in] | name | Name to search for. |
[in] | start | Where to begin search. |
std::pair< hash_iterator, hash_iterator > FrameCPP::Common::SearchContainer< T, F >::hashFind | ( | const std::string & | name | ) |
Finds an element with a the given name via a hash.
[in] | name | The name to search for. |
std::pair< hash_iterator, hash_iterator > FrameCPP::Common::SearchContainer< T, F >::hashFind | ( | const std::string & | name | ) |
Finds an element with a the given name via a hash.
[in] | name | The name to search for. |
std::pair< hash_iterator, hash_iterator > FrameCPP::Common::SearchContainer< T, F >::hashFind | ( | const std::string & | name | ) |
Finds an element with a the given name via a hash.
[in] | name | The name to search for. |
std::pair< const_hash_iterator, const_hash_iterator > FrameCPP::Common::SearchContainer< T, F >::hashFind | ( | const std::string & | name | ) | const |
Finds an element with the given name via a hash.
[in] | name | The name to search for. |
std::pair< const_hash_iterator, const_hash_iterator > FrameCPP::Common::SearchContainer< T, F >::hashFind | ( | const std::string & | name | ) | const |
Finds an element with the given name via a hash.
[in] | name | The name to search for. |
std::pair< const_hash_iterator, const_hash_iterator > FrameCPP::Common::SearchContainer< T, F >::hashFind | ( | const std::string & | name | ) | const |
Finds an element with the given name via a hash.
[in] | name | The name to search for. |
|
inline |
Insert an item into the container.
[in] | pos | An iterator pointing to the location where the element should be added. |
[in] | data | The item to add. |
std::bad_alloc | Memory could not be allocated for the element. |
|
inline |
Insert an item into the container.
[in] | pos | An iterator pointing to the location where the element should be added. |
[in] | data | The item to add. |
std::bad_alloc | Memory could not be allocated for the element. |
|
inline |
Insert an item into the container.
[in] | pos | An iterator pointing to the location where the element should be added. |
[in] | data | The item to add. |
std::bad_alloc | Memory could not be allocated for the element. |
|
inline |
Insert an item into the container.
[in] | index | The index at which the element should be added. If the index is out of range then the element will be inserted at the end. |
[in] | data | The item to add. |
|
inline |
Insert an item into the container.
[in] | index | The index at which the element should be added. If the index is out of range then the element will be inserted at the end. |
[in] | data | The item to add. |
|
inline |
Insert an item into the container.
[in] | index | The index at which the element should be added. If the index is out of range then the element will be inserted at the end. |
[in] | data | The item to add. |
|
inherited |
Inequality operator.
[in] | c | The container to compare with. |
This chacks to see if two containers do not contain identical elements.
|
inherited |
Inequality operator.
[in] | c | The container to compare with. |
|
inherited |
Inequality operator.
[in] | c | The container to compare with. |
const SearchContainer< T, F >& FrameCPP::Common::SearchContainer< T, F >::operator= | ( | const SearchContainer< T, F > & | sc | ) |
Assignment Operator.
[in] | sc | Search container to be assigned. |
const SearchContainer< T, F >& FrameCPP::Common::SearchContainer< T, F >::operator= | ( | const SearchContainer< T, F > & | sc | ) |
Assignment Operator.
[in] | sc | Search container to be assigned. |
const SearchContainer< T, F >& FrameCPP::Common::SearchContainer< T, F >::operator= | ( | const SearchContainer< T, F > & | sc | ) |
Assignment Operator.
[in] | sc | Search container to be assigned. |
|
inherited |
Equality operator.
[in] | c | The container to compare with. |
|
inherited |
Equality operator.
[in] | c | The container to compare with. |
|
inherited |
Equality operator.
[in] | c | The container to compare with. |
|
inline |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex | ) |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex | ) |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
|
inline |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex | ) | const |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex | ) | const |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex, |
const_iterator | start | ||
) | const |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
[in] | start | Where to begin search. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex, |
const_iterator | start | ||
) | const |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
[in] | start | Where to begin search. |
const_iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex, |
const_iterator | start | ||
) | const |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
[in] | start | Where to begin search. |
iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex, |
iterator | start | ||
) |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
[in] | start | Where to begin search. |
iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex, |
iterator | start | ||
) |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
[in] | start | Where to begin search. |
iterator FrameCPP::Common::SearchContainer< T, F >::regexFind | ( | const std::string & | regex, |
iterator | start | ||
) |
Finds an element with a name matching the given regex.
[in] | regex | Regular expression to search for. |
[in] | start | Where to begin search. |