Developer Documentation
OpenMesh::PropertyContainer Class Reference

A a container for properties. More...

#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Core/Utils/PropertyContainer.hh>

Public Types

typedef std::vector< BaseProperty * > Properties
 

Public Member Functions

const Propertiesproperties () const
 
size_t size () const
 
 PropertyContainer (const PropertyContainer &_rhs)
 
PropertyContaineroperator= (const PropertyContainer &_rhs)
 
template<class T >
BasePropHandleT< T > add (const T &, const std::string &_name="<unknown>")
 
template<class T >
BasePropHandleT< T > handle (const T &, const std::string &_name) const
 
BasePropertyproperty (const std::string &_name) const
 
template<class T >
PropertyT< T > & property (BasePropHandleT< T > _h)
 
template<class T >
const PropertyT< T > & property (BasePropHandleT< T > _h) const
 
template<class T >
void remove (BasePropHandleT< T > _h)
 
void clear ()
 
void reserve (size_t _n) const
 
void resize (size_t _n) const
 
void resize_if_smaller (size_t _n) const
 
void swap (size_t _i0, size_t _i1) const
 

Protected Types

typedef Properties::iterator iterator
 
typedef Properties::const_iterator const_iterator
 

Protected Member Functions

size_t _add (BaseProperty *_bp)
 
BaseProperty_property (size_t _idx)
 
const BaseProperty_property (size_t _idx) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

Private Attributes

Properties properties_
 

Friends

class BaseKernel
 

Detailed Description

A a container for properties.

Definition at line 58 of file PropertyContainer.hh.

Member Typedef Documentation

◆ const_iterator

typedef Properties::const_iterator OpenMesh::PropertyContainer::const_iterator
protected

Definition at line 297 of file PropertyContainer.hh.

◆ iterator

typedef Properties::iterator OpenMesh::PropertyContainer::iterator
protected

Definition at line 296 of file PropertyContainer.hh.

◆ Properties

typedef std::vector<BaseProperty*> OpenMesh::PropertyContainer::Properties

Definition at line 70 of file PropertyContainer.hh.

Constructor & Destructor Documentation

◆ PropertyContainer() [1/2]

OpenMesh::PropertyContainer::PropertyContainer ( )
inline

Definition at line 64 of file PropertyContainer.hh.

◆ ~PropertyContainer()

virtual OpenMesh::PropertyContainer::~PropertyContainer ( )
inlinevirtual

Definition at line 65 of file PropertyContainer.hh.

◆ PropertyContainer() [2/2]

OpenMesh::PropertyContainer::PropertyContainer ( const PropertyContainer _rhs)
inline

Definition at line 78 of file PropertyContainer.hh.

Member Function Documentation

◆ _add()

size_t OpenMesh::PropertyContainer::_add ( BaseProperty _bp)
inlineprotected

Definition at line 267 of file PropertyContainer.hh.

◆ _property() [1/2]

BaseProperty & OpenMesh::PropertyContainer::_property ( size_t  _idx)
inlineprotected

Definition at line 277 of file PropertyContainer.hh.

◆ _property() [2/2]

const BaseProperty & OpenMesh::PropertyContainer::_property ( size_t  _idx) const
inlineprotected

Definition at line 286 of file PropertyContainer.hh.

◆ add()

template<class T >
BasePropHandleT< T > OpenMesh::PropertyContainer::add ( const T &  ,
const std::string &  _name = "<unknown>" 
)
inline

Definition at line 97 of file PropertyContainer.hh.

◆ begin() [1/2]

iterator OpenMesh::PropertyContainer::begin ( )
inlineprotected

Definition at line 298 of file PropertyContainer.hh.

◆ begin() [2/2]

const_iterator OpenMesh::PropertyContainer::begin ( ) const
inlineprotected

Definition at line 300 of file PropertyContainer.hh.

◆ clear()

void OpenMesh::PropertyContainer::clear ( void  )
inline

Definition at line 168 of file PropertyContainer.hh.

◆ end() [1/2]

iterator OpenMesh::PropertyContainer::end ( )
inlineprotected

Definition at line 299 of file PropertyContainer.hh.

◆ end() [2/2]

const_iterator OpenMesh::PropertyContainer::end ( ) const
inlineprotected

Definition at line 301 of file PropertyContainer.hh.

◆ handle()

template<class T >
BasePropHandleT< T > OpenMesh::PropertyContainer::handle ( const T &  ,
const std::string &  _name 
) const
inline

Definition at line 109 of file PropertyContainer.hh.

◆ operator=()

PropertyContainer & OpenMesh::PropertyContainer::operator= ( const PropertyContainer _rhs)
inline

Definition at line 80 of file PropertyContainer.hh.

◆ properties()

const Properties & OpenMesh::PropertyContainer::properties ( ) const
inline

Definition at line 71 of file PropertyContainer.hh.

◆ property() [1/3]

template<class T >
PropertyT< T > & OpenMesh::PropertyContainer::property ( BasePropHandleT< T >  _h)
inline

Definition at line 138 of file PropertyContainer.hh.

◆ property() [2/3]

template<class T >
const PropertyT< T > & OpenMesh::PropertyContainer::property ( BasePropHandleT< T >  _h) const
inline

Definition at line 149 of file PropertyContainer.hh.

◆ property() [3/3]

BaseProperty * OpenMesh::PropertyContainer::property ( const std::string &  _name) const
inline

Definition at line 125 of file PropertyContainer.hh.

◆ remove()

template<class T >
void OpenMesh::PropertyContainer::remove ( BasePropHandleT< T >  _h)
inline

Definition at line 160 of file PropertyContainer.hh.

◆ reserve()

void OpenMesh::PropertyContainer::reserve ( size_t  _n) const
inline

Reserves space for _n elements in all property vectors.

Definition at line 231 of file PropertyContainer.hh.

◆ resize()

void OpenMesh::PropertyContainer::resize ( size_t  _n) const
inline

Resizes all property vectors to the specified size.

Definition at line 238 of file PropertyContainer.hh.

◆ resize_if_smaller()

void OpenMesh::PropertyContainer::resize_if_smaller ( size_t  _n) const
inline

Same as

See also
resize() but ignores property vectors that have a size larger than _n.

Use this method instead of

See also
resize() if you plan to frequently reduce and enlarge the property container and you don't want to waste time reallocating the property vectors every time.

Definition at line 250 of file PropertyContainer.hh.

◆ size()

size_t OpenMesh::PropertyContainer::size ( ) const
inline

Definition at line 72 of file PropertyContainer.hh.

◆ swap()

void OpenMesh::PropertyContainer::swap ( size_t  _i0,
size_t  _i1 
) const
inline

Swaps the items with index _i0 and index _i1 in all property vectors.

Definition at line 258 of file PropertyContainer.hh.

Friends And Related Function Documentation

◆ BaseKernel

friend class BaseKernel
friend

Definition at line 303 of file PropertyContainer.hh.

Member Data Documentation

◆ properties_

Properties OpenMesh::PropertyContainer::properties_
private

Definition at line 351 of file PropertyContainer.hh.


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