Visual Computing Library
|
Allows to access directly to a custom component. More...
#include <vclib/mesh/containers/custom_component_vector_handle.h>
Classes | |
class | ConstIterator |
class | Iterator |
Public Member Functions | |
CustomComponentVectorHandle (std::vector< std::any > &cc) | |
T & | at (uint i) |
const T & | at (uint i) const |
T & | front () |
const T & | front () const |
T & | back () |
const T & | back () const |
uint | size () const |
T & | operator[] (uint i) |
const T & | operator[] (uint i) const |
Iterator | begin () |
Iterator | end () |
ConstIterator | begin () const |
ConstIterator | end () const |
Private Attributes | |
std::vector< std::reference_wrapper< T > > | mVec |
Allows to access directly to a custom component.
The class allows to access a custom component stored in a Contaner of Elements without having to use the Container itself and avoiding copies, and it can be used as a normal std::vector. The class stores references to the custom components, therefore it allows to modify them.
It is meant to be created by a Container, that constructs it from the vector of custom components and then returns it to the user.
T | The type of the custom component. |