MeshLink
Computational geometry access
MeshString Class Reference

1D (curve) mesh topology More...

#include <MeshString.h>

Inheritance diagram for MeshString:

Public Member Functions

 MeshString (MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Constructor with no application-defined reference data. More...
 
 MeshString (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Constructor with application-defined reference data. More...
 
virtual bool addEdge (MLINT i1, MLINT i2, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, bool mapID)
 Add a MeshEdge to the MeshString using indices. More...
 
virtual bool addEdge (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, bool mapID)
 Add a MeshEdge to the MeshString using reference. More...
 
virtual MeshEdgefindEdgeByInds (MLINT i1, MLINT i2) const
 Find a MeshEdge in the MeshString associativity data. More...
 
virtual void deleteEdgeByInds (MLINT i1, MLINT i2)
 Delete a MeshEdge from the MeshString associativity data. More...
 
virtual MeshEdgegetMeshEdgeByName (const std::string &name) const
 Find a MeshEdge by name. More...
 
virtual MeshEdgegetMeshEdgeByRef (const std::string &ref) const
 Find a MeshEdge by reference. More...
 
virtual MLINT getNumEdges () const
 Return the number of MeshEdges in the MeshString. More...
 
virtual void getMeshEdges (std::vector< const MeshEdge * > &edges) const
 Return array of MeshEdges in the MeshString. More...
 
 MeshString ()
 Default constructor. More...
 
 ~MeshString ()
 Destructor. More...
 
virtual const std::string & getBaseName () const
 Return the base name used for generating unique names for strings. More...
 
virtual MLUINTgetNameCounter ()
 Return the current value used for generating unique names for strings. More...
 
- Public Member Functions inherited from MeshTopo
 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...
 
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...
 

Private Attributes

std::map< pwiFnvHash::FNVHash, MeshPoint * > pointMap_
 Map point index hash to point. More...
 
MeshPointNameMap meshPointNameMap_
 Map point name to point. More...
 
MeshTopoIDToNameMap meshPointIDToNameMap_
 Map point ID to point name. More...
 
std::map< pwiFnvHash::FNVHash, MeshEdge * > edgeMap_
 Map edge indices hash to edge. More...
 
MeshEdgeNameMap meshEdgeNameMap_
 Map edge name to edge. More...
 
MeshTopoIDToNameMap meshEdgeIDToNameMap_
 Map edge unique ID to edge name. More...
 
MeshTopoRefToNameMap meshEdgeRefToNameMap_
 Map edge application-defined reference string th edge name. More...
 
MLUINT edgeCounter_
 Serial counter as edges are added to the string (zero-based) More...
 

Static Private Attributes

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

Friends

class MeshAssociativity
 
class MeshModel
 

Additional Inherited Members

- Static Public Member Functions inherited from MeshTopo
static bool OrderCompare (const MeshTopo *topo1, const MeshTopo *topo2)
 
- Protected Attributes inherited from MeshTopo
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...
 

Detailed Description

1D (curve) mesh topology

Provides access to MeshLink schema MeshString data

Definition at line 33 of file MeshString.h.

Constructor & Destructor Documentation

◆ MeshString() [1/3]

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

Constructor with no application-defined reference data.

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

◆ MeshString() [2/3]

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

Constructor with application-defined reference data.

Parameters
refapplication-defined reference data for the mesh string
midunique ID of the mesh string
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh string

◆ MeshString() [3/3]

MeshString::MeshString ( )

Default constructor.

◆ ~MeshString()

MeshString::~MeshString ( )

Destructor.

Member Function Documentation

◆ addEdge() [1/2]

virtual bool MeshString::addEdge ( MLINT  i1,
MLINT  i2,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
bool  mapID 
)
virtual

Add a MeshEdge to the MeshString using indices.

Parameters
i1,i2the point indices of the string edge
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity
pv1,pv2(optional) the ParamVertex objects associated with the points
mapIDwhether to map the unique ID to the entity name

◆ addEdge() [2/2]

virtual bool MeshString::addEdge ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
bool  mapID 
)
virtual

Add a MeshEdge to the MeshString using reference.

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
pv1,pv2(optional) the ParamVertex objects associated with the points
mapIDwhether to map the unique ID to the entity name

◆ deleteEdgeByInds()

virtual void MeshString::deleteEdgeByInds ( MLINT  i1,
MLINT  i2 
)
virtual

Delete a MeshEdge from the MeshString associativity data.

Parameters
i1,i2the point indices of the string edge to delete

◆ findEdgeByInds()

virtual MeshEdge* MeshString::findEdgeByInds ( MLINT  i1,
MLINT  i2 
) const
virtual

Find a MeshEdge in the MeshString associativity data.

Parameters
i1,i2the point indices of the desired string edge

◆ getBaseName()

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

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

Reimplemented from MeshTopo.

◆ getMeshEdgeByName()

virtual MeshEdge* MeshString::getMeshEdgeByName ( const std::string &  name) const
virtual

Find a MeshEdge by name.

Parameters
namethe name of the desired string edge

◆ getMeshEdgeByRef()

virtual MeshEdge* MeshString::getMeshEdgeByRef ( const std::string &  ref) const
virtual

Find a MeshEdge by reference.

Parameters
refthe application-defined reference string of the desired string edge

◆ getMeshEdges()

virtual void MeshString::getMeshEdges ( std::vector< const MeshEdge * > &  edges) const
virtual

Return array of MeshEdges in the MeshString.

Edges are returned in creation order.

◆ getNameCounter()

virtual MLUINT& MeshString::getNameCounter ( )
virtual

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

Reimplemented from MeshTopo.

◆ getNumEdges()

virtual MLINT MeshString::getNumEdges ( ) const
virtual

Return the number of MeshEdges in the MeshString.

Friends And Related Function Documentation

◆ MeshAssociativity

friend class MeshAssociativity
friend

Definition at line 35 of file MeshString.h.

◆ MeshModel

friend class MeshModel
friend

Definition at line 36 of file MeshString.h.

Member Data Documentation

◆ edgeCounter_

MLUINT MeshString::edgeCounter_
private

Serial counter as edges are added to the string (zero-based)

Definition at line 156 of file MeshString.h.

◆ edgeMap_

std::map<pwiFnvHash::FNVHash, MeshEdge*> MeshString::edgeMap_
private

Map edge indices hash to edge.

Definition at line 147 of file MeshString.h.

◆ meshEdgeIDToNameMap_

MeshTopoIDToNameMap MeshString::meshEdgeIDToNameMap_
private

Map edge unique ID to edge name.

Definition at line 151 of file MeshString.h.

◆ meshEdgeNameMap_

MeshEdgeNameMap MeshString::meshEdgeNameMap_
private

Map edge name to edge.

Definition at line 149 of file MeshString.h.

◆ meshEdgeRefToNameMap_

MeshTopoRefToNameMap MeshString::meshEdgeRefToNameMap_
private

Map edge application-defined reference string th edge name.

Definition at line 153 of file MeshString.h.

◆ meshPointIDToNameMap_

MeshTopoIDToNameMap MeshString::meshPointIDToNameMap_
private

Map point ID to point name.

Definition at line 144 of file MeshString.h.

◆ meshPointNameMap_

MeshPointNameMap MeshString::meshPointNameMap_
private

Map point name to point.

Definition at line 142 of file MeshString.h.

◆ nameCounter_

MLUINT MeshString::nameCounter_
staticprivate

The unique name counter for strings.

Definition at line 137 of file MeshString.h.

◆ pointMap_

std::map<pwiFnvHash::FNVHash, MeshPoint*> MeshString::pointMap_
private

Map point index hash to point.

Definition at line 140 of file MeshString.h.


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