MeshKit
1.0
|
00001 #ifndef MESHKIT_MESH_OP_SET_HPP 00002 #define MESHKIT_MESH_OP_SET_HPP 00003 00004 #include <vector> 00005 00006 namespace MeshKit 00007 { 00008 00009 class MeshOpProxy; 00010 00022 class MeshOpSet 00023 { 00024 public: 00026 static MeshOpSet& instance(); 00027 00036 void register_mesh_op( MeshOpProxy* proxy ); 00037 00039 typedef std::vector<MeshOpProxy*> OpList; 00040 00042 typedef OpList::const_iterator iterator; 00043 00049 const OpList& mesh_ops( unsigned dimension ) const 00050 { return dimMeshOps[dimension]; } 00051 00056 const OpList& mesh_ops() const 00057 { return allMeshOps; } 00058 00066 MeshOpProxy* mesh_op( const char* name ) const; 00067 00075 unsigned index( const char* name ) const; 00076 00084 MeshOpProxy* mesh_op( unsigned index ) const; 00085 00086 private: 00087 00089 MeshOpSet(); 00090 00098 iterator mesh_op_no_throw( const char* name ) const; 00099 00100 00102 OpList allMeshOps; 00104 OpList dimMeshOps[4]; 00105 }; 00106 00107 } // namespace MeshKit 00108 00109 #endif // #ifdef MESHKIT_MESH_OP_SET_HPP