VTK
dox/IO/Exodus/vtkExodusIIReaderVariableCheck.h
Go to the documentation of this file.
00001 #ifndef __vtkExodusIIReaderVariableCheck_h
00002 #define __vtkExodusIIReaderVariableCheck_h
00003 
00004 #include "vtkExodusIIReaderPrivate.h" // for ArrayInfoType
00005 
00006 #include <vtksys/RegularExpression.hxx> // for integration point names
00007 #include <vtksys/String.hxx> // STL Header for Start/StartInternal/Add
00008 #include <vector> // STL Header for glommed array names
00009 #include <set> // STL Header for integration point names
00010 
00017 class vtkExodusIIReaderVariableCheck
00018 {
00019 public:
00021   virtual bool Start( vtksys_stl::string name, const int* truth, int numTruth );
00023   virtual bool StartInternal( vtksys_stl::string name, const int* truth, int numTruth ) = 0;
00025   virtual bool Add( vtksys_stl::string name, const int* truth ) = 0;
00027   virtual std::vector<vtksys_stl::string>::size_type Length();
00029   virtual int Accept(
00030     std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr,
00031     int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp );
00032 
00033 protected:
00034   vtkExodusIIReaderVariableCheck();
00035   virtual ~vtkExodusIIReaderVariableCheck();
00039   bool CheckTruth( const int* truth );
00040   bool UniquifyName(
00041     vtkExodusIIReaderPrivate::ArrayInfoType& ainfo,
00042     std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arrays );
00043 
00044   int GlomType;
00045   std::vector<int> SeqTruth;
00046   vtksys_stl::string Prefix;
00047   std::vector<vtksys_stl::string> OriginalNames;
00048 };
00049 
00051 class vtkExodusIIReaderScalarCheck : public vtkExodusIIReaderVariableCheck
00052 {
00053 public:
00054   vtkExodusIIReaderScalarCheck();
00055   virtual bool StartInternal( vtksys_stl::string name, const int*, int );
00056   virtual bool Add( vtksys_stl::string, const int* );
00057 };
00058 
00060 class vtkExodusIIReaderVectorCheck : public vtkExodusIIReaderVariableCheck
00061 {
00062 public:
00063   vtkExodusIIReaderVectorCheck( const char* seq, int n );
00064   virtual bool StartInternal( vtksys_stl::string name, const int*, int );
00065   virtual bool Add( vtksys_stl::string name, const int* truth );
00066   virtual std::vector<vtksys_stl::string>::size_type Length();
00067 protected:
00068   vtksys_stl::string Endings;
00069   bool StillAdding;
00070 };
00071 
00078 class vtkExodusIIReaderTensorCheck : public vtkExodusIIReaderVariableCheck
00079 {
00080 public:
00081   vtkExodusIIReaderTensorCheck( const char* seq, int n, int rank, int dim );
00082   virtual bool StartInternal( vtksys_stl::string name, const int*, int );
00083   virtual bool Add( vtksys_stl::string name, const int* truth );
00084   virtual std::vector<vtksys_stl::string>::size_type Length();
00085 protected:
00086   vtksys_stl::string Endings;
00087   vtkTypeUInt64 NumEndings;
00088   int Dimension;
00089   int Rank;
00090   bool StillAdding;
00091 };
00092 
00094 class vtkExodusIIReaderIntPointCheck : public vtkExodusIIReaderVariableCheck
00095 {
00096 public:
00097   vtkExodusIIReaderIntPointCheck();
00098   virtual bool StartInternal( vtksys_stl::string name, const int*, int );
00099   virtual bool Add( vtksys_stl::string name, const int* );
00100   virtual std::vector<vtksys_stl::string>::size_type Length();
00101   /*
00102   virtual int Accept(
00103     std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp )
00104     {
00105     }
00106     */
00107 protected:
00108   bool StartIntegrationPoints( vtksys_stl::string cellType, vtksys_stl::string iptName );
00109   bool AddIntegrationPoint( vtksys_stl::string iptName );
00110 
00111   vtksys::RegularExpression RegExp;
00112   vtksys_stl::string VarName;
00113   vtksys_stl::string CellType;
00114   std::vector<int> IntPtMin;
00115   std::vector<int> IntPtMax;
00116   std::set<vtksys_stl::string> IntPtNames;
00117   vtkTypeUInt64 Rank;
00118   bool StillAdding;
00119 };
00120 
00121 #endif // __vtkExodusIIReaderVariableCheck_h
00122 // VTK-HeaderTest-Exclude: vtkExodusIIReaderVariableCheck.h