Lagrange
|
Base handle for attributes. More...
#include <lagrange/Attribute.h>
Inherited by Attribute< ValueType >, Attribute< Index >, Attribute< ValueType_ >, and IndexedAttribute< ValueType_, Index_ >.
Public Member Functions | |
AttributeBase (AttributeElement element, AttributeUsage usage, size_t num_channels) | |
Constructs a new instance. More... | |
virtual | ~AttributeBase () |
Destroys the object. | |
AttributeBase (AttributeBase &&other)=default | |
Move constructor. More... | |
AttributeBase & | operator= (AttributeBase &&other)=default |
Assignment move operator. More... | |
AttributeBase (const AttributeBase &other)=default | |
Copy constructor. More... | |
AttributeBase & | operator= (const AttributeBase &other)=default |
Assignment copy operator. More... | |
virtual AttributeValueType | get_value_type () const =0 |
Gets the attribute value type. More... | |
AttributeElement | get_element_type () const |
Gets the attribute element type. More... | |
AttributeUsage | get_usage () const |
Gets the attribute usage tag. More... | |
size_t | get_num_channels () const |
Gets the number of channels for the attribute. More... | |
void | unsafe_set_usage (AttributeUsage usage) |
Sets the attribute usage tag. More... | |
void | unsafe_set_element_type (AttributeElement element) |
Sets the attribute element type. More... | |
Protected Attributes | |
AttributeElement | m_element |
Element type (vertex, facet, indexed, etc.). | |
AttributeUsage | m_usage |
Attribute usage tag. | |
size_t | m_num_channels = 0 |
Number of channel for each value. | |
Base handle for attributes.
This is a common base class to allow for type erasure.
AttributeBase | ( | AttributeElement | element, |
AttributeUsage | usage, | ||
size_t | num_channels | ||
) |
Constructs a new instance.
[in] | element | Element type (vertex, facet, etc.). |
[in] | usage | Usage tag. |
[in] | num_channels | Number of channels. |
|
default |
Move constructor.
other | Instance to move from. |
|
default |
Copy constructor.
[in] | other | Instance to copy from. |
|
default |
Assignment move operator.
other | Instance to move from. |
|
default |
Assignment copy operator.
[in] | other | Instance to copy from. |
|
pure virtual |
Gets the attribute value type.
Implemented in Attribute< ValueType_ >, Attribute< ValueType >, Attribute< Index >, and IndexedAttribute< ValueType_, Index_ >.
|
inline |
Gets the attribute element type.
|
inline |
Gets the attribute usage tag.
|
inline |
Gets the number of channels for the attribute.
|
inline |
Sets the attribute usage tag.
[in] | usage | New usage tag. |
|
inline |
Sets the attribute element type.
[in] | element | New element type. |