MeshKit
1.0
|
00001 00006 #ifndef MESHKIT_REGISTER_MESH_OP_HPP 00007 #define MESHKIT_REGISTER_MESH_OP_HPP 00008 00009 #include "meshkit/MeshOpProxy.hpp" 00010 #include "meshkit/MKCore.hpp" 00011 00012 namespace MeshKit { 00013 00025 template <class TYPE> 00026 class RegisterMeshOp : public MeshOpProxy 00027 { 00028 public: 00029 00032 RegisterMeshOp() 00033 { MKCore::register_meshop(this); } 00034 00036 MeshOp* create( MKCore* core, const MEntVector& vec ) 00037 { TYPE *t = new TYPE(core, vec); t->set_name(name()); return t;} 00038 00040 const char* name() const 00041 { return TYPE::name(); } 00042 00048 const moab::EntityType* output_types() const 00049 { return TYPE::output_types(); } 00050 00056 bool can_mesh( iBase_EntityType dimension ) const 00057 { return TYPE::can_mesh(dimension); } 00058 00064 bool can_mesh( ModelEnt* entity ) const 00065 { return TYPE::can_mesh(entity); } 00066 }; 00067 00068 } // namespace MeshKit 00069 00070 #endif 00071