ug4
|
You may add elements to this interface and iterate over them. More...
#include <pcl_communication_structs.h>
Public Types | |
typedef interface_tags::basic_interface_tag | category_tag |
typedef ElemContainer::const_iterator | const_iterator |
typedef type_traits< TType >::Elem | Element |
typedef ElemContainer::iterator | iterator |
typedef TType | Type |
Public Member Functions | |
BasicInterface (int targetProc=-1) | |
iterator | begin () |
const_iterator | begin () const |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
iterator | erase (iterator iter) |
const Element & | get_element (const_iterator iter) const |
Element & | get_element (iterator iter) |
int | get_target_proc () const |
iterator | push_back (const Element &elem) |
size_t | size () const |
returns the number of elements that are stored in the interface. More... | |
template<class TCompare > | |
void | sort (TCompare cmp) |
sort the entries in this interface. More... | |
void | swap (BasicInterface &interface) |
swaps the content of two interfaces. More... | |
Protected Types | |
typedef TContainer< TElem, TAlloc< TElem > > | ElemContainer |
typedef type_traits< TType >::Elem | TElem |
Protected Attributes | |
ElemContainer | m_elements |
size_t | m_size |
int | m_targetProc |
You may add elements to this interface and iterate over them.
This interface type features a minimal set of methods that is required to actually work with it. You may add new elements, erase old ones and iterate through them.
In order to access the associated element of an iterator you should use get_element (not the * operator of the iterator). This increases the flexibility of your code.
You may specify a stl-container compatible type that is used to store. the elements. Supported types are std::vector and std::list.
TContainer defaults to std::vector. This is the best option if your interface is mainly used static or grows, but is considerably slower than std::list if you want to erase elements often. For dynamic interfaces std::list may be the better option.
typedef interface_tags::basic_interface_tag pcl::BasicInterface< TType, TContainer, TAlloc >::category_tag |
typedef ElemContainer::const_iterator pcl::BasicInterface< TType, TContainer, TAlloc >::const_iterator |
|
protected |
typedef type_traits<TType>::Elem pcl::BasicInterface< TType, TContainer, TAlloc >::Element |
typedef ElemContainer::iterator pcl::BasicInterface< TType, TContainer, TAlloc >::iterator |
|
protected |
typedef TType pcl::BasicInterface< TType, TContainer, TAlloc >::Type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
returns the number of elements that are stored in the interface.
References pcl::BasicInterface< TType, TContainer, TAlloc >::m_size.
Referenced by pcl::BasicInterface< TType, TContainer, TAlloc >::empty().
|
inline |
sort the entries in this interface.
References pcl::BasicInterface< TType, TContainer, TAlloc >::m_elements.
|
inline |
swaps the content of two interfaces.
m_elements, m_size and m_targetProc are swapped.
References pcl::BasicInterface< TType, TContainer, TAlloc >::m_elements, pcl::BasicInterface< TType, TContainer, TAlloc >::m_size, and pcl::BasicInterface< TType, TContainer, TAlloc >::m_targetProc.
|
protected |
Referenced by pcl::BasicInterface< TType, TContainer, TAlloc >::begin(), pcl::BasicInterface< TType, TContainer, TAlloc >::end(), pcl::BasicInterface< TType, TContainer, TAlloc >::erase(), pcl::BasicInterface< TType, TContainer, TAlloc >::push_back(), pcl::BasicInterface< TType, TContainer, TAlloc >::sort(), and pcl::BasicInterface< TType, TContainer, TAlloc >::swap().
|
protected |
|
protected |