MeshLink
Computational geometry access
|
Storage for MeshLink Attribute and AttributeGroup data. More...
#include <MeshAssociativity.h>
Public Member Functions | |
MeshLinkAttribute () | |
Default constructor. More... | |
MeshLinkAttribute (MLINT attid, std::string &name, std::string &contents, bool is_group, MeshAssociativity &meshAssoc) | |
MLINT | getAttID () const |
Get the AttID of this attribute. More... | |
bool | isGroup () const |
Whether this attribute is a group of other MeshLinkAttribute s. More... | |
bool | isValid () const |
const std::vector< MLINT > & | getAttributeIDs () const |
Get the AttIDs referenced by this attribute. More... | |
Private Member Functions | |
bool | buildGroupArefs (MeshAssociativity &meshAssoc) |
Build list of MeshLinkAttribute IDs referenced by the GeometryGroup. More... | |
Private Attributes | |
MLINT | attid_ |
The AttID of this attribute. More... | |
std::string | name_ |
The name of this attribute. More... | |
std::string | contents_ |
The application-defined contents of the attribute, from the MeshLink file. More... | |
bool | is_group_ |
Whether this attribute is a group of other attributes. More... | |
bool | is_valid_ |
Whether this attribute is valid. More... | |
std::vector< MLINT > | group_arefs_ |
Friends | |
class | MeshAssociativity |
Storage for MeshLink Attribute and AttributeGroup data.
MeshLink entities reference attributes through an AREF attribute which is the integer ID of the MeshLinkAttribute associated with the entity. A MeshLinkAttribute can be a group of other MeshLinkAttributes.
MeshLink attributes are for use by applications, and have no expressed nor implied usage within MeshLink. Access to attributes by an application are through MeshAssociativity.getAttribute and MeshAssociativity.getAttributeByID.
Definition at line 301 of file MeshAssociativity.h.
MeshLinkAttribute::MeshLinkAttribute | ( | ) |
Default constructor.
MeshLinkAttribute::MeshLinkAttribute | ( | MLINT | attid, |
std::string & | name, | ||
std::string & | contents, | ||
bool | is_group, | ||
MeshAssociativity & | meshAssoc | ||
) |
Constructor for an attribute with a unique attribute ID (AttID) and name. The attribute's definition is given by its contents.
|
private |
Build list of MeshLinkAttribute IDs referenced by the GeometryGroup.
For an attribute group, recursively dereference attributes to build a complete and unique list of all attributes referenced by the group.
MLINT MeshLinkAttribute::getAttID | ( | ) | const |
Get the AttID of this attribute.
const std::vector<MLINT>& MeshLinkAttribute::getAttributeIDs | ( | ) | const |
Get the AttIDs referenced by this attribute.
If the MeshLinkAttribute is a group, the AttIDs of the group members are returned, otherwise, this attribute's AttID is returned
bool MeshLinkAttribute::isGroup | ( | ) | const |
Whether this attribute is a group of other MeshLinkAttribute s.
bool MeshLinkAttribute::isValid | ( | ) | const |
Whether this attribute is valid. An attribute may be invalid if it is a group of other attribute IDs, and any one of which do not exist.
|
friend |
Definition at line 303 of file MeshAssociativity.h.
|
private |
The AttID of this attribute.
Definition at line 339 of file MeshAssociativity.h.
|
private |
The application-defined contents of the attribute, from the MeshLink file.
Definition at line 343 of file MeshAssociativity.h.
|
private |
The list of other attribute AttIDs to which this attribute refers (for attribute groups).
Definition at line 350 of file MeshAssociativity.h.
|
private |
Whether this attribute is a group of other attributes.
Definition at line 345 of file MeshAssociativity.h.
|
private |
Whether this attribute is valid.
Definition at line 347 of file MeshAssociativity.h.
|
private |
The name of this attribute.
Definition at line 341 of file MeshAssociativity.h.