|
Easy3D 2.6.1
|
Implementation of a generic property. More...
#include <easy3d/core/property.h>
Public Types | |
| typedef PropertyArray< T >::reference | reference |
| The reference type of the property. | |
| typedef PropertyArray< T >::const_reference | const_reference |
| The const reference type of the property. | |
Public Member Functions | |
| Property (PropertyArray< T > *p=nullptr) | |
| Constructor. | |
| virtual | ~Property ()=default |
| Destructor. | |
| void | reset () |
| Resets the property. | |
| operator bool () const | |
| Checks if the property is valid. | |
| virtual reference | operator[] (size_t i) |
| Accesses the i-th element. | |
| virtual const_reference | operator[] (size_t i) const |
| Const access to the i-th element. | |
| const T * | data () const |
| Gets a pointer to the array. | |
| std::vector< T > & | vector () |
| Gets a reference to the underlying vector. | |
| const std::vector< T > & | vector () const |
| Const access to the underlying vector. | |
| PropertyArray< T > & | array () |
| Gets a reference to the property array. | |
| const PropertyArray< T > & | array () const |
| Const access to the property array. | |
| const std::string & | name () const |
| Returns the name of the property. | |
| void | set_name (const std::string &n) |
| Sets the name of the property. | |
Friends | |
| class | PropertyContainer |
Implementation of a generic property.
| T | The type of the property. |
|
inlineexplicit |
Constructor.
| p | A pointer to the property array. |
|
inline |
Gets a reference to the property array.
|
inline |
Const access to the property array.
|
inline |
Gets a pointer to the array.
|
inline |
Returns the name of the property.
|
inline |
Checks if the property is valid.
|
inlinevirtual |
Accesses the i-th element.
| i | The index of the element. |
Reimplemented in Graph::ModelProperty< T >, PointCloud::ModelProperty< T >, PolyMesh::ModelProperty< T >, and SurfaceMesh::ModelProperty< T >.
|
inlinevirtual |
Const access to the i-th element.
| i | The index of the element. |
Reimplemented in Graph::ModelProperty< T >, PointCloud::ModelProperty< T >, PolyMesh::ModelProperty< T >, and SurfaceMesh::ModelProperty< T >.
|
inline |
Sets the name of the property.
| n | The new name of the property. |
|
inline |
Gets a reference to the underlying vector.
|
inline |
Const access to the underlying vector.