MeshLink
Computational geometry access
MeshTopo Class Reference

Base class for mesh topology entities. More...

#include <MeshTopo.h>

Inheritance diagram for MeshTopo:

Public Member Functions

 MeshTopo (MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Construct without application-defined reference. More...
 
 MeshTopo (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Construct with application-defined reference to entity in mesh data. More...
 
virtual MLINT getID () const
 Return the ID of this MeshTopo. More...
 
virtual MLINT getGref () const
 Return the GID of GeometryGroup associated with this MeshTopo. More...
 
virtual MLINT getAref () const
 Return the AttID of MeshLinkAttribute associated with this MeshTopo. More...
 
virtual void getName (const char **name) const
 Return the name of this MeshTopo. More...
 
virtual const std::string & getName () const
 Return the name of this MeshTopo. More...
 
virtual const std::string & getRef () const
 Return the application-defined mesh data reference of this MeshTopo. More...
 
virtual void addParamVertex (ParamVertex *pv, bool mapID)
 Add a ParamVertex. More...
 
virtual ParamVertexgetParamVertByVref (const std::string &vref) const
 Find a ParamVertex by vertex reference. More...
 
virtual ParamVertexgetParamVertByID (MLINT id) const
 Find a ParamVertex by ID. More...
 
virtual MLINT getNumParamVerts () const
 Return the number of ParamVertex objects for this MeshTopo. More...
 
void getParamVerts (std::vector< const ParamVertex * > &pv) const
 Return vector of ParamVertex objects for this MeshTopo. More...
 
virtual const ParamVertVrefMapgetParamVertVrefMap () const
 Return the map of application-defined reference string to ParamVertex objects for this MeshTopo. More...
 
virtual void setID (MLINT id)
 Set the ID of this MeshTopo. More...
 
virtual void setGref (MLINT gref)
 Set the GeometryGroup GID referenced by this MeshTopo. More...
 
virtual void setAref (MLINT aref)
 Set the MeshLinkAttribute AttID referenced by this MeshTopo. More...
 
virtual void setRef (const char *ref)
 Set the reference of this MeshTopo. More...
 
void setName (const std::string &name)
 Set the name of this MeshTopo. More...
 
void setName (const char *name)
 Set the name of this MeshTopo. More...
 
bool hasID () const
 Whether the MeshTopo has an ID defined. More...
 
bool hasGref () const
 Whether the MeshTopo has a GeometryGroup GID reference defined. More...
 
bool hasAref () const
 Whether the MeshTopo has a MeshLinkAttribute AttID reference defined. More...
 
std::vector< MLINTgetAttributeIDs (const MeshAssociativity &meshAssoc) const
 Return list of MeshLinkAttribute AttIDs referenced by the MeshTopo. More...
 
std::string getNextName ()
 Generate and return a unique name for the entity. More...
 
virtual const std::string & getBaseName () const
 Returns the base name used for generating unique mesh entity names. More...
 
virtual MLUINTgetNameCounter ()
 Returns the current value of the counter used for generating unique mesh entity names. More...
 
void setOrderCounter (MLUINT counter)
 Set order counter (in parent topo) More...
 
MLUINT getOrderCounter () const
 Returns order counter (in parent topo) More...
 
 MeshTopo ()
 Default constructor. More...
 
 ~MeshTopo ()
 Destructor. More...
 

Static Public Member Functions

static bool OrderCompare (const MeshTopo *topo1, const MeshTopo *topo2)
 

Protected Attributes

std::string ref_
 The application-defined reference string. More...
 
MLINT mid_
 The unique entity ID. More...
 
MLINT aref_
 The attribute reference ID (AttID) More...
 
MLINT gref_
 The geometry reference ID. More...
 
std::string name_
 The name of the mesh entity. More...
 
MLUINT orderCounter_
 creation order counter in parent entity More...
 
ParamVertVrefMap paramVertVrefMap_
 ParamVertex objects mapped to this entity by application-defined reference string. More...
 
ParamVertIDToVrefMap paramVertIDToVrefMap_
 ParamVertex objects mapped to this entity by unique entity ID. More...
 

Static Private Attributes

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

Friends

class MeshAssociativity
 

Detailed Description

Base class for mesh topology entities.

Common data for MeshString, MeshSheet, MeshModel topology and MeshPoint, MeshEdge, MeshFace elements.

Definition at line 132 of file MeshTopo.h.

Constructor & Destructor Documentation

◆ MeshTopo() [1/3]

MeshTopo::MeshTopo ( MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name 
)

Construct without application-defined reference.

Parameters
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity

◆ MeshTopo() [2/3]

MeshTopo::MeshTopo ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name 
)

Construct with application-defined reference to entity in mesh data.

Parameters
refthe application-defined reference of the mesh entity
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity

◆ MeshTopo() [3/3]

MeshTopo::MeshTopo ( )

Default constructor.

◆ ~MeshTopo()

MeshTopo::~MeshTopo ( )

Destructor.

Member Function Documentation

◆ addParamVertex()

virtual void MeshTopo::addParamVertex ( ParamVertex pv,
bool  mapID 
)
virtual

Add a ParamVertex.

Parameters
pvthe vertex to add
mapIDwhether to map the unique ID to the entity name

◆ getAref()

virtual MLINT MeshTopo::getAref ( ) const
virtual

Return the AttID of MeshLinkAttribute associated with this MeshTopo.

◆ getAttributeIDs()

std::vector<MLINT> MeshTopo::getAttributeIDs ( const MeshAssociativity meshAssoc) const

Return list of MeshLinkAttribute AttIDs referenced by the MeshTopo.

◆ getBaseName()

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

Returns the base name used for generating unique mesh entity names.

Reimplemented in MeshFace, MeshModel, MeshEdge, MeshPoint, MeshSheet, and MeshString.

◆ getGref()

virtual MLINT MeshTopo::getGref ( ) const
virtual

Return the GID of GeometryGroup associated with this MeshTopo.

◆ getID()

virtual MLINT MeshTopo::getID ( ) const
virtual

Return the ID of this MeshTopo.

◆ getName() [1/2]

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

Return the name of this MeshTopo.

N.B. return value subject to change

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

◆ getName() [2/2]

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

Return the name of this MeshTopo.

◆ getNameCounter()

virtual MLUINT& MeshTopo::getNameCounter ( )
virtual

Returns the current value of the counter used for generating unique mesh entity names.

Reimplemented in MeshFace, MeshModel, MeshEdge, MeshPoint, MeshSheet, and MeshString.

◆ getNextName()

std::string MeshTopo::getNextName ( )

Generate and return a unique name for the entity.

◆ getNumParamVerts()

virtual MLINT MeshTopo::getNumParamVerts ( ) const
virtual

Return the number of ParamVertex objects for this MeshTopo.

Reimplemented in MeshFace, and MeshEdge.

◆ getOrderCounter()

MLUINT MeshTopo::getOrderCounter ( ) const

Returns order counter (in parent topo)

◆ getParamVertByID()

virtual ParamVertex* MeshTopo::getParamVertByID ( MLINT  id) const
virtual

Find a ParamVertex by ID.

Parameters
idthe unique ID of the desired ParamVertex

◆ getParamVertByVref()

virtual ParamVertex* MeshTopo::getParamVertByVref ( const std::string &  vref) const
virtual

Find a ParamVertex by vertex reference.

Parameters
vrefthe application-defined reference string of the desired ParamVertex

◆ getParamVerts()

void MeshTopo::getParamVerts ( std::vector< const ParamVertex * > &  pv) const

Return vector of ParamVertex objects for this MeshTopo.

◆ getParamVertVrefMap()

virtual const ParamVertVrefMap& MeshTopo::getParamVertVrefMap ( ) const
virtual

Return the map of application-defined reference string to ParamVertex objects for this MeshTopo.

◆ getRef()

virtual const std::string& MeshTopo::getRef ( ) const
virtual

Return the application-defined mesh data reference of this MeshTopo.

◆ hasAref()

bool MeshTopo::hasAref ( ) const

Whether the MeshTopo has a MeshLinkAttribute AttID reference defined.

◆ hasGref()

bool MeshTopo::hasGref ( ) const

Whether the MeshTopo has a GeometryGroup GID reference defined.

◆ hasID()

bool MeshTopo::hasID ( ) const

Whether the MeshTopo has an ID defined.

◆ OrderCompare()

static bool MeshTopo::OrderCompare ( const MeshTopo topo1,
const MeshTopo topo2 
)
static

◆ setAref()

virtual void MeshTopo::setAref ( MLINT  aref)
virtual

Set the MeshLinkAttribute AttID referenced by this MeshTopo.

Parameters
arefthe attribute reference ID (AttID) for this mesh entity

◆ setGref()

virtual void MeshTopo::setGref ( MLINT  gref)
virtual

Set the GeometryGroup GID referenced by this MeshTopo.

Parameters
grefthe geometry reference ID for this mesh entity

◆ setID()

virtual void MeshTopo::setID ( MLINT  id)
virtual

Set the ID of this MeshTopo.

Parameters
idthe unique ID of this mesh entity

◆ setName() [1/2]

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

Set the name of this MeshTopo.

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 MeshTopo::setName ( const char *  name)

Set the name of this MeshTopo.

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

◆ setOrderCounter()

void MeshTopo::setOrderCounter ( MLUINT  counter)

Set order counter (in parent topo)

◆ setRef()

virtual void MeshTopo::setRef ( const char *  ref)
virtual

Set the reference of this MeshTopo.

Parameters
refthe application-defined reference string for this mesh entity

Friends And Related Function Documentation

◆ MeshAssociativity

friend class MeshAssociativity
friend

Definition at line 134 of file MeshTopo.h.

Member Data Documentation

◆ aref_

MLINT MeshTopo::aref_
protected

The attribute reference ID (AttID)

Definition at line 286 of file MeshTopo.h.

◆ gref_

MLINT MeshTopo::gref_
protected

The geometry reference ID.

Definition at line 288 of file MeshTopo.h.

◆ mid_

MLINT MeshTopo::mid_
protected

The unique entity ID.

Definition at line 284 of file MeshTopo.h.

◆ name_

std::string MeshTopo::name_
protected

The name of the mesh entity.

Definition at line 290 of file MeshTopo.h.

◆ nameCounter_

MLUINT MeshTopo::nameCounter_
staticprivate

The unique name counter.

Definition at line 301 of file MeshTopo.h.

◆ orderCounter_

MLUINT MeshTopo::orderCounter_
protected

creation order counter in parent entity

Definition at line 292 of file MeshTopo.h.

◆ paramVertIDToVrefMap_

ParamVertIDToVrefMap MeshTopo::paramVertIDToVrefMap_
protected

ParamVertex objects mapped to this entity by unique entity ID.

Definition at line 297 of file MeshTopo.h.

◆ paramVertVrefMap_

ParamVertVrefMap MeshTopo::paramVertVrefMap_
protected

ParamVertex objects mapped to this entity by application-defined reference string.

Definition at line 295 of file MeshTopo.h.

◆ ref_

std::string MeshTopo::ref_
protected

The application-defined reference string.

Definition at line 280 of file MeshTopo.h.


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