A class for caching and managing Tags on element corners. More...
#include <CornerTag.hpp>
Public Member Functions | |
CornerTag (const char *name, Mesh::TagType type=Mesh::BYTE) | |
Initialize. More... | |
~CornerTag () | |
void | clear () |
Clear cached data. More... | |
const T * | get_element_corner_tags (PatchData *pd, int elem_idx, MsqError &err) |
Get a pointer to the array of all corner tag values for a given element. More... | |
void | set_element_corner_tags (PatchData *pd, int elem_idx, const T *data, MsqError &err) |
CornerTag (const char *name, Mesh::TagType type=Mesh::BYTE) | |
Initialize. More... | |
~CornerTag () | |
void | clear () |
Clear cached data. More... | |
const T * | get_element_corner_tags (PatchData *pd, int elem_idx, MsqError &err) |
Get a pointer to the array of all corner tag values for a given element. More... | |
void | set_element_corner_tags (PatchData *pd, int elem_idx, const T *data, MsqError &err) |
Private Attributes | |
CornerTagHandles | tagHandles |
msq_std::vector< T * > | tagData |
A class for caching and managing Tags on element corners.
This class provides:
Due to limitations in accessing tag data (and for more efficient access to tag data) this class assumes that either all or none of the corner tags have been defined for the elements in a patch.
When creating new tags, first call allocate_new_tags to allocate a local cache of the tag data for all elements in the patch. Then use get_element_corner_tags to retrieve the allocated space for the corners of each element. Calling get_element_corner_tags without first calling allocate_new_tags will result in an attempt to read the tag data for all elements from the Mesh instance.
Tag data is not saved to the mesh unless save_tag_data is explicitly called.
Definition at line 110 of file includeLinks/CornerTag.hpp.
CornerTag | ( | const char * | name, |
Mesh::TagType | type = Mesh::BYTE |
||
) |
Initialize.
mesh | A pointer to the Mesh instance. |
name | The tag name. |
type | The native tag type. If the type "T" can be cast to one or an array of some native type, specify that type here. Otherwise use Mesh::BYTE |
Definition at line 147 of file includeLinks/CornerTag.hpp.
References CornerTagHandles::size().
~CornerTag | ( | ) |
Definition at line 156 of file includeLinks/CornerTag.hpp.
CornerTag | ( | const char * | name, |
Mesh::TagType | type = Mesh::BYTE |
||
) |
Initialize.
mesh | A pointer to the Mesh instance. |
name | The tag name. |
type | The native tag type. If the type "T" can be cast to one or an array of some native type, specify that type here. Otherwise use Mesh::BYTE |
~CornerTag | ( | ) |
|
inline |
Clear cached data.
Any changes will be lost if save_tag_data has not been called.
Definition at line 162 of file includeLinks/CornerTag.hpp.
References i.
|
inline |
Clear cached data.
Any changes will be lost if save_tag_data has not been called.
Get a pointer to the array of all corner tag values for a given element.
Definition at line 170 of file includeLinks/CornerTag.hpp.
References MSQ_ERRZERO.
|
inline |
Definition at line 188 of file includeLinks/CornerTag.hpp.
References MSQ_CHKERR.
|
inline |
|
private |
Definition at line 142 of file includeLinks/CornerTag.hpp.
|
private |
Definition at line 141 of file includeLinks/CornerTag.hpp.