List of objects.
More...
#include <btkCollection.h>
template<class T>
class btk::Collection< T >
List of objects.
Const iterator for items contained in the Collection object.
Smart pointer associated with a const Collection object.
Smart pointer associated with a const T object.
Smart pointer associated with a T object.
Iterator for items contained in the Collection object.
Special null pointer associated with a Collection object. This type should be used only internally to test the nullity of a smart pointer. See the static method Null() instead.
Smart pointer associated with a Collection object.
Returns an iterator to the beginning of the list of items.
Returns a const iterator to the beginning of the list of items.
Clear the contents of the list.
Returns an iterator just past the last item.
Returns a const iterator just past the last item.
Returns the item in back of the list.
Returns the item in back of the list.
Returns the item in front of the list.
Returns the item in front of the list.
Return the index associated with the item elt
or -1 if not found
Returns a smart pointer of the object located at the index idx.
Returns a const smart pointer of the object located at the index idx.
Returns the number of items in the list.
Inserts the smart pointer elt in the list at the location loc.
- Returns
- True if elt has been inserted or false otherwise.
Inserts the smart pointer elt in the list at the index idx.
- Returns
- True if elt has been inserted or false otherwise.
Inserts the smart pointer elt at the end of the list.
- Returns
- True if elt has been inserted or false otherwise.
Returns true if the collection is empty.
Creates a smart pointer associated with a Collection<T> object.
Static function to return a null pointer.
- Note
- This static method should be used only to test if a shared ponter is null or not. It is advised to call the method without parenthesis as special (in)equality operator are implemented to use a function pointer. See the description of the class NullPtr for an example.
Removes the item at the location loc.
Removes the item at the index idx.
Sets the smart pointer elt in the list at the index idx.
- Returns
- True if elt has been assigned or false otherwise.
Sets the number of items in the list.
Removes the item at the location loc and return it.
Removes the item at the index idx and return it.