moab
ReadTemplate.hpp
Go to the documentation of this file.
00001 #ifndef READ_TEMPLATE_HPP
00002 #define READ_TEMPLATE_HPP
00003 
00004 #include "moab/ReaderIface.hpp"
00005 #include "moab/Range.hpp"
00006 
00007 namespace moab {
00008 
00009 class ReadUtilIface;
00010 class Interface;
00011 
00022 class ReadTemplate : public ReaderIface
00023 {
00024    
00025 public:
00026 
00028   static ReaderIface* factory( Interface* );
00029 
00030   ErrorCode load_file( const char* file_name,
00031                        const EntityHandle* file_set,
00032                        const FileOptions& opts,
00033                        const SubsetList* subset_list = 0,
00034                        const Tag* file_id_tag = 0 );
00035 
00036   ErrorCode read_tag_values( const char* file_name,
00037                              const char* tag_name,
00038                              const FileOptions& opts,
00039                              std::vector<int>& tag_values_out,
00040                              const SubsetList* subset_list = 0 );
00041   
00043   ReadTemplate(Interface* impl = NULL);
00044 
00046   virtual ~ReadTemplate();
00047 
00048 private:
00049 
00055   ErrorCode read_vertices(int num_verts, EntityHandle &start_vertex, Range &read_ents);
00056   
00063   ErrorCode read_elements(int num_elems, EntityHandle start_vertex,
00064                           EntityHandle &start_elem, Range &read_ents);
00065 
00074   ErrorCode create_sets(int num_sets, EntityHandle start_vertex, int num_verts, 
00075                         EntityHandle start_elem, int num_elems, Range &read_ents);
00076   
00077   
00081   ErrorCode process_options(const FileOptions &opts);
00082   
00083   ReadUtilIface* readMeshIface;
00084 
00086   Interface* mbImpl;
00087 
00088   const char *fileName;
00089   
00090 };
00091 
00092 } // namespace moab
00093 
00094 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines