MeshLink
Computational geometry access
MeshElementLinkage Class Reference

Storage for MeshLink ElementLinkage data. More...

#include <MeshAssociativity.h>

Public Member Functions

 MeshElementLinkage ()
 Default constructor. More...
 
 MeshElementLinkage (std::string &name, std::string &sourceEntityRef, std::string &targetEntityRef, MeshAssociativity &meshAssoc)
 
virtual void setAref (MLINT aref)
 Set the MeshLinkAttribute AttID referenced by this MeshElementLinkage. More...
 
bool hasAref () const
 Whether the MeshElementLinkage has a MeshLinkAttribute AttID reference defined. More...
 
MLINT getAref () const
 Get the MeshLinkAttribute AttID referenced by this MeshElementLinkage. More...
 
virtual bool setXref (MLINT xref, MeshAssociativity &meshAssoc)
 Set the Transform XID referenced by this MeshElementLinkage. More...
 
bool hasXref () const
 Whether the MeshElementLinkage has a Transform XID reference defined. More...
 
virtual bool getXref (MLINT *xref) const
 Get the Transform XID referenced by this MeshElementLinkage. More...
 
const MeshLinkTransformgetTransform (const MeshAssociativity &meshAssoc) const
 Get the Transform referenced by this MeshElementLinkage. More...
 
bool isValid () const
 
virtual void getName (const char **name) const
 Return the name of this MeshElementLinkage. More...
 
virtual const std::string & getName () const
 Return the name of this MeshElementLinkage. More...
 
void setName (const std::string &name)
 Set the name of this MeshElementLinkage. More...
 
void setName (const char *name)
 Set the name of this MeshElementLinkage. More...
 
std::string getNextName ()
 Generate and return a unique name for the entity. More...
 
void getEntityRefs (std::string &sourceEntityRef, std::string &targetEntityRef) const
 Return the Entity references linked by this MeshElementLinkage. More...
 
virtual const std::string & getBaseName () const
 Return the base name used for generating unique names for linkages. More...
 
virtual MLUINTgetNameCounter ()
 Return the current value used for generating unique names for linkages. More...
 

Private Attributes

std::string name_
 The name of this linkage. More...
 
MLINT aref_
 The attribute reference ID (AttID) More...
 
MLINT xref_
 The transform reference ID (XID) More...
 
std::string sourceEntityRef_
 The source entity reference. More...
 
std::string targetEntityRef_
 The target entity reference. More...
 
bool is_valid_
 Whether this linkage is valid. More...
 

Static Private Attributes

static MLUINT nameCounter_
 The unique name counter for linkages. More...
 

Friends

class MeshAssociativity
 

Detailed Description

Storage for MeshLink ElementLinkage data.

A MeshElementLinkage provides a mapping of one referenced mesh element (sheet, face, string, edge or vertex) to another, with an optional transform (to identify slaved periodic transformations, for example).

sourceEntityRef and targetEntityRef attributes are defined in an application-specific manner; for example, mesh element reference IDs or mesh element names.

Definition at line 179 of file MeshAssociativity.h.

Constructor & Destructor Documentation

◆ MeshElementLinkage() [1/2]

MeshElementLinkage::MeshElementLinkage ( )

Default constructor.

◆ MeshElementLinkage() [2/2]

MeshElementLinkage::MeshElementLinkage ( std::string &  name,
std::string &  sourceEntityRef,
std::string &  targetEntityRef,
MeshAssociativity meshAssoc 
)

Constructor for an transform with a unique transform ID (AttID) and name. The transform's definition is given by its contents.

Member Function Documentation

◆ getAref()

MLINT MeshElementLinkage::getAref ( ) const

Get the MeshLinkAttribute AttID referenced by this MeshElementLinkage.

◆ getBaseName()

virtual const std::string& MeshElementLinkage::getBaseName ( ) const
virtual

Return the base name used for generating unique names for linkages.

◆ getEntityRefs()

void MeshElementLinkage::getEntityRefs ( std::string &  sourceEntityRef,
std::string &  targetEntityRef 
) const

Return the Entity references linked by this MeshElementLinkage.

Parameters
[out]sourceEntityRefreference to the source entity
[out]targetEntityRefreference to the target entity

◆ getName() [1/2]

virtual void MeshElementLinkage::getName ( const char **  name) const
virtual

Return the name of this MeshElementLinkage.

N.B. return value subject to change

Parameters
[out]namethe non-modifiable name of the entity

◆ getName() [2/2]

virtual const std::string& MeshElementLinkage::getName ( ) const
virtual

Return the name of this MeshElementLinkage.

◆ getNameCounter()

virtual MLUINT& MeshElementLinkage::getNameCounter ( )
virtual

Return the current value used for generating unique names for linkages.

◆ getNextName()

std::string MeshElementLinkage::getNextName ( )

Generate and return a unique name for the entity.

◆ getTransform()

const MeshLinkTransform* MeshElementLinkage::getTransform ( const MeshAssociativity meshAssoc) const

Get the Transform referenced by this MeshElementLinkage.

returns NULL if XREF is unset or invalid

◆ getXref()

virtual bool MeshElementLinkage::getXref ( MLINT xref) const
virtual

Get the Transform XID referenced by this MeshElementLinkage.

Parameters
[out]xrefthe transform reference ID (XID) for this linkage

◆ hasAref()

bool MeshElementLinkage::hasAref ( ) const

Whether the MeshElementLinkage has a MeshLinkAttribute AttID reference defined.

◆ hasXref()

bool MeshElementLinkage::hasXref ( ) const

Whether the MeshElementLinkage has a Transform XID reference defined.

◆ isValid()

bool MeshElementLinkage::isValid ( ) const
inline

Whether this linkage is valid. A linkage may be invalid if the sourceEntityRef or targetEntityRef are unknown.

Definition at line 224 of file MeshAssociativity.h.

◆ setAref()

virtual void MeshElementLinkage::setAref ( MLINT  aref)
virtual

Set the MeshLinkAttribute AttID referenced by this MeshElementLinkage.

Parameters
arefthe attribute reference ID (AttID) for this linkage

◆ setName() [1/2]

void MeshElementLinkage::setName ( const std::string &  name)

Set the name of this MeshElementLinkage.

setName is special and should not be overridden, as it provides a mechanism for generating unique names

Parameters
namethe name of the mesh entity, or empty if a unique name is to be generated

◆ setName() [2/2]

void MeshElementLinkage::setName ( const char *  name)

Set the name of this MeshElementLinkage.

setName is special and should not be overrided it provides a mechanism for generating unique names

Parameters
namethe name of the mesh entity, or null if a unique name is to be generated

◆ setXref()

virtual bool MeshElementLinkage::setXref ( MLINT  xref,
MeshAssociativity meshAssoc 
)
virtual

Set the Transform XID referenced by this MeshElementLinkage.

Parameters
xrefthe transform reference ID (XID) for this linkage

Friends And Related Function Documentation

◆ MeshAssociativity

friend class MeshAssociativity
friend

Definition at line 181 of file MeshAssociativity.h.

Member Data Documentation

◆ aref_

MLINT MeshElementLinkage::aref_
private

The attribute reference ID (AttID)

Definition at line 273 of file MeshAssociativity.h.

◆ is_valid_

bool MeshElementLinkage::is_valid_
private

Whether this linkage is valid.

Definition at line 281 of file MeshAssociativity.h.

◆ name_

std::string MeshElementLinkage::name_
private

The name of this linkage.

Definition at line 271 of file MeshAssociativity.h.

◆ nameCounter_

MLUINT MeshElementLinkage::nameCounter_
staticprivate

The unique name counter for linkages.

Definition at line 268 of file MeshAssociativity.h.

◆ sourceEntityRef_

std::string MeshElementLinkage::sourceEntityRef_
private

The source entity reference.

Definition at line 277 of file MeshAssociativity.h.

◆ targetEntityRef_

std::string MeshElementLinkage::targetEntityRef_
private

The target entity reference.

Definition at line 279 of file MeshAssociativity.h.

◆ xref_

MLINT MeshElementLinkage::xref_
private

The transform reference ID (XID)

Definition at line 275 of file MeshAssociativity.h.


The documentation for this class was generated from the following file: