ug4
pcl::BasicInterface< TType, TContainer, TAlloc > Class Template Reference

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 Elementget_element (const_iterator iter) const
 
Elementget_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
 

Detailed Description

template<class TType, template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
class pcl::BasicInterface< TType, TContainer, TAlloc >

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.

Member Typedef Documentation

◆ category_tag

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef interface_tags::basic_interface_tag pcl::BasicInterface< TType, TContainer, TAlloc >::category_tag

◆ const_iterator

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef ElemContainer::const_iterator pcl::BasicInterface< TType, TContainer, TAlloc >::const_iterator

◆ ElemContainer

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef TContainer<TElem, TAlloc<TElem> > pcl::BasicInterface< TType, TContainer, TAlloc >::ElemContainer
protected

◆ Element

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef type_traits<TType>::Elem pcl::BasicInterface< TType, TContainer, TAlloc >::Element

◆ iterator

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef ElemContainer::iterator pcl::BasicInterface< TType, TContainer, TAlloc >::iterator

◆ TElem

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef type_traits<TType>::Elem pcl::BasicInterface< TType, TContainer, TAlloc >::TElem
protected

◆ Type

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef TType pcl::BasicInterface< TType, TContainer, TAlloc >::Type

Constructor & Destructor Documentation

◆ BasicInterface()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
pcl::BasicInterface< TType, TContainer, TAlloc >::BasicInterface ( int  targetProc = -1)
inline

Member Function Documentation

◆ begin() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::BasicInterface< TType, TContainer, TAlloc >::begin ( )
inline

◆ begin() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
const_iterator pcl::BasicInterface< TType, TContainer, TAlloc >::begin ( ) const
inline

◆ empty()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
bool pcl::BasicInterface< TType, TContainer, TAlloc >::empty ( ) const
inline

◆ end() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::BasicInterface< TType, TContainer, TAlloc >::end ( )
inline

◆ end() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
const_iterator pcl::BasicInterface< TType, TContainer, TAlloc >::end ( ) const
inline

◆ erase()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::BasicInterface< TType, TContainer, TAlloc >::erase ( iterator  iter)
inline

◆ get_element() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
const Element& pcl::BasicInterface< TType, TContainer, TAlloc >::get_element ( const_iterator  iter) const
inline

◆ get_element() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
Element& pcl::BasicInterface< TType, TContainer, TAlloc >::get_element ( iterator  iter)
inline

◆ get_target_proc()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
int pcl::BasicInterface< TType, TContainer, TAlloc >::get_target_proc ( ) const
inline

◆ push_back()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::BasicInterface< TType, TContainer, TAlloc >::push_back ( const Element elem)
inline

◆ size()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::BasicInterface< TType, TContainer, TAlloc >::size ( ) const
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().

◆ sort()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
template<class TCompare >
void pcl::BasicInterface< TType, TContainer, TAlloc >::sort ( TCompare  cmp)
inline

sort the entries in this interface.

References pcl::BasicInterface< TType, TContainer, TAlloc >::m_elements.

◆ swap()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
void pcl::BasicInterface< TType, TContainer, TAlloc >::swap ( BasicInterface< TType, TContainer, TAlloc > &  interface)
inline

Member Data Documentation

◆ m_elements

◆ m_size

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::BasicInterface< TType, TContainer, TAlloc >::m_size
protected

◆ m_targetProc

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
int pcl::BasicInterface< TType, TContainer, TAlloc >::m_targetProc
protected

The documentation for this class was generated from the following file: