MeshKit  1.0
list_meshops.cpp
Go to the documentation of this file.
00001 #include "meshkit/MKCore.hpp"
00002 #include "meshkit/MeshOpProxy.hpp"
00003 #include "moab/CN.hpp"
00004 #include <iostream>
00005 #include <iomanip>
00006 
00007 using namespace MeshKit;
00008 using namespace std;
00009 
00010 int main()
00011 {
00012   const unsigned n = MKCore::num_meshops();
00013   if (n == 0)
00014     return 1; // fail
00015   
00016   for (unsigned i = 0; i < n; ++i) {
00017     MeshOpProxy* p = MKCore::meshop_proxy(i);
00018     
00019     cout << i << " " << p->name() << " { ";
00020     bool first = true;
00021     for (unsigned j = 0; j < 4; ++j) {
00022       if (p->can_mesh((iBase_EntityType)j)) {
00023         if (first)
00024           first = false;
00025         else
00026           cout << ", ";
00027         cout << j;
00028       }
00029     }
00030     
00031     cout << " } { ";
00032 
00033     const moab::EntityType* types = p->output_types();
00034     first = true;
00035     for (unsigned j = 0; types[j] != moab::MBMAXTYPE; ++j) {
00036       if (first)
00037         first = false;
00038       else 
00039         cout << ", ";
00040       cout << moab::CN::EntityTypeName(types[j]);
00041     }
00042     
00043     cout << " }" << endl;
00044     
00045   }
00046   
00047   return 0;
00048 }
00049 
00050   
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines