|
| tgTaggables (std::vector< T > &elements) |
|
std::vector< T * > | find (std::string tags) |
|
int | size () const |
|
std::vector< T * > | findAll () |
|
std::vector< T * > | findUntagged () |
|
bool | contains (const T &needle) const |
|
T & | operator[] (int key) |
|
const T & | operator[] (int key) const |
|
T & | operator-= (const T &other) |
|
T & | operator-= (const std::vector< T * > other) |
|
T & | operator+= (const T &other) |
|
T & | operator+= (const std::vector< T * > other) |
|
|
static bool | contains (std::vector< T * > haystack, const T *needle) |
|
|
int | addElement (T element) |
|
void | addElements (std::vector< T * > elements) |
|
void | setElement (int key, T element) |
|
std::vector< T > & | getElements () |
|
const std::vector< T > & | getElements () const |
|
void | removeElement (const T &element) |
|
void | removeElement (const T *element) |
|
void | removeElements (const std::vector< T > &elements) |
|
void | removeElements (const std::vector< T * > &elements) |
|
T & | getElement (int key) |
|
const T & | getElement (int key) const |
|
bool | keyExists (int key) const |
|
bool | elementExists (const T &element) const |
|
void | assertKeyExists (int key, std::string message="Element at index does not exist") const |
|
void | assertUnique (T &element, std::string message="Taggable elements must be unique.") |
|
void | assertUniqueElements (std::string message="Taggable elements must be unique.") const |
|
tgTaggable * | _taggable (T *obj) |
|
template<class T>
class tgTaggables< T >
Definition at line 37 of file tgTaggables.h.
Create a set of elements given a vector of T.
- Parameters
-
[in] | nodes | a vector of T; the elements must be unique |
- Author
- Lee Brownston
- Date
- Wed 26 Feb 2014
Definition at line 52 of file tgTaggables.h.
template<class T>
std::vector<T*> tgTaggables< T >::find |
( |
std::string |
tags | ) |
|
|
inline |
Return a vector of pointers to Ts that have all of the specified tags.
Definition at line 64 of file tgTaggables.h.
Is the index within range.
- Parameters
-
- Return values
-
true | if key is within range |
false | if key is not within range |
Definition at line 229 of file tgTaggables.h.
Remove the elements contained in 'other' from this object
Definition at line 136 of file tgTaggables.h.
Return a non-const reference to the element that is indexed by the int key. It must be in m_elements.
- Parameters
-
[in] | key | the key of the element to retrieve a const reference to the element that is indexed by idx |
Definition at line 123 of file tgTaggables.h.
The documentation for this class was generated from the following file: