MeshKit
1.0
|
Maintain global, singletin list of registered MeshOps. More...
#include <MeshOpSet.hpp>
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 OpList & | mesh_ops (unsigned dimension) const |
Get list of all MeshOps that can be used to generate mesh entities of the specified dimension. | |
const OpList & | mesh_ops () const |
Get list of all mesh ops. | |
MeshOpProxy * | mesh_op (const char *name) const |
Get MeshOpProxy by name. | |
unsigned | index (const char *name) const |
Get index of MeshOpProxy. | |
MeshOpProxy * | mesh_op (unsigned index) const |
Get MeshOpProxy by index. | |
Static Public Member Functions | |
static MeshOpSet & | instance () |
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. |
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.
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.
MeshOpSet | ( | ) | [private] |
Private constructor for singleton pattern.
Definition at line 8 of file MeshOpSet.cpp.
unsigned index | ( | const char * | name | ) | const |
Get index of MeshOpProxy.
Get index of MeshOpProxy. Throws exception if not found.
name | MeshOp class name. |
Definition at line 59 of file MeshOpSet.cpp.
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.
name | MeshOp class 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.
index | MeshOp index. |
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.
name | MeshOp class name. |
Definition at line 42 of file MeshOpSet.cpp.
Get list of all MeshOps that can be used to generate mesh entities of the specified dimension.
dimension | Dimension of entity to be meshed |
Definition at line 49 of file MeshOpSet.hpp.
Get list of all mesh ops.
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).
proxy | Proxy for MeshOp sub-class. |
Definition at line 16 of file MeshOpSet.cpp.
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.