MeshKit  1.0
MeshOpSet Class Reference

Maintain global, singletin list of registered MeshOps. More...

#include <MeshOpSet.hpp>

List of all members.

Public Types

typedef std::vector
< MeshOpProxy * > 
OpList
 Type of list returned by reference from member methods.
typedef OpList::const_iterator iterator
 Type of iterator to use with /c OpList.

Public Member Functions

void register_mesh_op (MeshOpProxy *proxy)
 Register a mesh op.
const OpListmesh_ops (unsigned dimension) const
 Get list of all MeshOps that can be used to generate mesh entities of the specified dimension.
const OpListmesh_ops () const
 Get list of all mesh ops.
MeshOpProxymesh_op (const char *name) const
 Get MeshOpProxy by name.
unsigned index (const char *name) const
 Get index of MeshOpProxy.
MeshOpProxymesh_op (unsigned index) const
 Get MeshOpProxy by index.

Static Public Member Functions

static MeshOpSetinstance ()
 Get singleton instance.

Private Member Functions

 MeshOpSet ()
 Private constructor for singleton pattern.
iterator mesh_op_no_throw (const char *name) const
 Get MeshOpProxy by name.

Private Attributes

OpList allMeshOps
 List of all registered MeshOps.
OpList dimMeshOps [4]
 Lists of all registered indexed by dimension of generated entities.

Detailed Description

Maintain global, singletin list of registered MeshOps.

This class implements the list of registered MeshOps. It uses the singleton pattern to provide a single global list while avoiding issues with order of initialization of static objects.

This class is intended only for internal use in MKCore. Access to this data maintained by this class should be done through static methods in the MKCore class.

Definition at line 22 of file MeshOpSet.hpp.


Member Typedef Documentation

typedef OpList::const_iterator iterator

Type of iterator to use with /c OpList.

Definition at line 42 of file MeshOpSet.hpp.

typedef std::vector<MeshOpProxy*> OpList

Type of list returned by reference from member methods.

Definition at line 39 of file MeshOpSet.hpp.


Constructor & Destructor Documentation

MeshOpSet ( ) [private]

Private constructor for singleton pattern.

Definition at line 8 of file MeshOpSet.cpp.


Member Function Documentation

unsigned index ( const char *  name) const

Get index of MeshOpProxy.

Get index of MeshOpProxy. Throws exception if not found.

Parameters:
nameMeshOp class name.
Returns:
index of MeshOpProxy for MeshOp with the passed name

Definition at line 59 of file MeshOpSet.cpp.

MeshOpSet & instance ( ) [static]

Get singleton instance.

Definition at line 10 of file MeshOpSet.cpp.

MeshOpProxy * mesh_op ( const char *  name) const

Get MeshOpProxy by name.

Get MeshOpProxy by name. Throws exception if not found.

Parameters:
nameMeshOp class name.
Returns:
MeshOpProxy for MeshOp with the passed name

Definition at line 51 of file MeshOpSet.cpp.

MeshOpProxy * mesh_op ( unsigned  index) const

Get MeshOpProxy by index.

Get MeshOpProxy by index. Throws exception if not found.

Parameters:
indexMeshOp index.
Returns:
the MeshOpProxy

Definition at line 67 of file MeshOpSet.cpp.

MeshOpSet::iterator mesh_op_no_throw ( const char *  name) const [private]

Get MeshOpProxy by name.

Returns allMeshOps.end() if not found.

Parameters:
nameMeshOp class name.
Returns:
iterator into allMeshOps

Definition at line 42 of file MeshOpSet.cpp.

const OpList& mesh_ops ( unsigned  dimension) const [inline]

Get list of all MeshOps that can be used to generate mesh entities of the specified dimension.

Parameters:
dimensionDimension of entity to be meshed
Returns:
List of MeshOps that can mesh entities of the specified dimesion.

Definition at line 49 of file MeshOpSet.hpp.

const OpList& mesh_ops ( ) const [inline]

Get list of all mesh ops.

Returns:
List of all registered MeshOps

Definition at line 56 of file MeshOpSet.hpp.

void register_mesh_op ( MeshOpProxy proxy)

Register a mesh op.

Register a new MeshOp. Will fail upon duplicate names unless proxy pointer is also the same (duplicate registration).

Parameters:
proxyProxy for MeshOp sub-class.

Definition at line 16 of file MeshOpSet.cpp.


Member Data Documentation

OpList allMeshOps [private]

List of all registered MeshOps.

Definition at line 102 of file MeshOpSet.hpp.

OpList dimMeshOps[4] [private]

Lists of all registered indexed by dimension of generated entities.

Definition at line 104 of file MeshOpSet.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines