#include <vector_occ.h>
Public Member Functions | |
template<class ATTR_TYPE > | |
void | Disable () |
Note: once an attribute is disabled, its data is lost (the memory freed). | |
template<class ATTR_TYPE > | |
void | Enable () |
this function enable the use of an optional attribute (see...) | |
template<class ATTR_TYPE > | |
bool | IsEnabled () const |
Note: once an attribute is disabled, its data is lost (the memory freed). | |
VALUE_TYPE * | Pointer2begin () |
void | pop_back () |
void | push_back (const VALUE_TYPE &v) |
void | reserve (const unsigned int &size) |
void | resize (const unsigned int &size) |
vector_occ () | |
~vector_occ () | |
Public Attributes | |
std::list< CATBase< ThisType > * > | attributes |
Private Types | |
typedef vector_occ< VALUE_TYPE > | ThisType |
typedef std::vector< VALUE_TYPE > | TT |
Private Member Functions | |
void | Update () |
Static Private Member Functions | |
static int & | ID () |
Private Attributes | |
int | id |
VALUE_TYPE * | old_start |
This class represent a vector_occ. A vector_occ is derived by a std::vector. The characteristic of a vector_occ is that you can add (at run time) new attributes to the container::value_type elements contained in the vector. (see the example..) The position in memory of a traced vector is kept by the Container Allocation Table, which is a (unique) list of vector_occ positions.
Definition at line 44 of file vector_occ.h.
typedef vector_occ<VALUE_TYPE> vcg::vector_occ< VALUE_TYPE >::ThisType [private] |
Definition at line 45 of file vector_occ.h.
typedef std::vector<VALUE_TYPE> vcg::vector_occ< VALUE_TYPE >::TT [private] |
Definition at line 46 of file vector_occ.h.
vcg::vector_occ< VALUE_TYPE >::vector_occ | ( | ) | [inline] |
Definition at line 49 of file vector_occ.h.
vcg::vector_occ< VALUE_TYPE >::~vector_occ | ( | ) | [inline] |
Definition at line 152 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::Disable | ( | ) | [inline] |
Note: once an attribute is disabled, its data is lost (the memory freed).
this function disable the use of an optional attribute (see...)
Definition at line 86 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::Enable | ( | ) | [inline] |
this function enable the use of an optional attribute (see...)
Definition at line 65 of file vector_occ.h.
static int& vcg::vector_occ< VALUE_TYPE >::ID | ( | ) | [inline, static, private] |
Definition at line 101 of file vector_occ.h.
bool vcg::vector_occ< VALUE_TYPE >::IsEnabled | ( | ) | const [inline] |
Note: once an attribute is disabled, its data is lost (the memory freed).
this function returns true if the attribute in the template parameter is enabled
Definition at line 74 of file vector_occ.h.
VALUE_TYPE* vcg::vector_occ< VALUE_TYPE >::Pointer2begin | ( | ) | [inline] |
Definition at line 52 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::pop_back | ( | ) | [inline] |
Definition at line 117 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::push_back | ( | const VALUE_TYPE & | v | ) | [inline] |
Definition at line 108 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::reserve | ( | const unsigned int & | size | ) | [inline] |
Definition at line 133 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::resize | ( | const unsigned int & | size | ) | [inline] |
Definition at line 123 of file vector_occ.h.
void vcg::vector_occ< VALUE_TYPE >::Update | ( | ) | [inline, private] |
Definition at line 140 of file vector_occ.h.
std::list< CATBase<ThisType>* > vcg::vector_occ< VALUE_TYPE >::attributes |
Definition at line 55 of file vector_occ.h.
int vcg::vector_occ< VALUE_TYPE >::id [private] |
Definition at line 100 of file vector_occ.h.
VALUE_TYPE* vcg::vector_occ< VALUE_TYPE >::old_start [private] |
Definition at line 99 of file vector_occ.h.