Version: 6.3.1

src/CONVERTOR/VISU_Convertor.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  VISU CONVERTOR :
00024 //  File   : VISU_Convertor.hxx
00025 //  Author : Alexey PETROV
00026 //  Module : VISU
00027 //
00028 #ifndef VISU_Convertor_HeaderFile
00029 #define VISU_Convertor_HeaderFile
00030 
00036 #include "VISU_Structures.hxx"
00037 
00038 
00039 //---------------------------------------------------------------
00041 
00053 class VISU_CONVERTOR_EXPORT VISU_Convertor
00054 {
00055 public:
00057   virtual
00058   const std::string& 
00059   GetName();
00060 
00062   virtual
00063   int
00064   IsDone() const;
00065 
00067   virtual
00068   VISU_Convertor* 
00069   Build() = 0;
00070 
00072   virtual
00073   VISU_Convertor* 
00074   BuildEntities() = 0;
00075 
00077   virtual
00078   VISU_Convertor* 
00079   BuildFields() = 0;
00080 
00082   virtual
00083   VISU_Convertor* 
00084   BuildMinMax() = 0;
00085 
00087   virtual
00088   VISU_Convertor* 
00089   BuildGroups() = 0;
00090 
00092   virtual
00093   const VISU::TMeshMap& 
00094   GetMeshMap();
00095 
00097   virtual
00098   size_t
00099   GetSize() = 0;
00100 
00102   virtual
00103   VISU::PNamedIDMapper 
00104   GetMeshOnEntity(const std::string& theMeshName, 
00105                   const VISU::TEntity& theEntity) = 0;
00106   
00108   virtual
00109   size_t
00110   GetMeshOnEntitySize(const std::string& theMeshName, 
00111                       const VISU::TEntity& theEntity) = 0;
00112   
00114   virtual 
00115   VISU::PUnstructuredGridIDMapper 
00116   GetFamilyOnEntity(const std::string& theMeshName, 
00117                     const VISU::TEntity& theEntity,
00118                     const std::string& theFamilyName) = 0;
00119 
00121   virtual 
00122   size_t 
00123   GetFamilyOnEntitySize(const std::string& theMeshName, 
00124                         const VISU::TEntity& theEntity,
00125                         const std::string& theFamilyName) = 0;
00126 
00128   virtual
00129   VISU::PUnstructuredGridIDMapper
00130   GetMeshOnGroup(const std::string& theMeshName, 
00131                  const std::string& theGroupName) = 0;
00132   
00134   virtual
00135   size_t
00136   GetMeshOnGroupSize(const std::string& theMeshName, 
00137                      const std::string& theGroupName) = 0;
00138   
00140   virtual
00141   VISU::PUnstructuredGridIDMapper 
00142   GetTimeStampOnMesh(const std::string& theMeshName, 
00143                      const VISU::TEntity& theEntity,
00144                      const std::string& theFieldName,
00145                      int theTimeStampNumber) = 0;
00146 
00148   virtual
00149   VISU::PGaussPtsIDMapper 
00150   GetTimeStampOnGaussPts(const std::string& theMeshName, 
00151                          const VISU::TEntity& theEntity,
00152                          const std::string& theFieldName,
00153                          int theTimeStampNumber) = 0;
00154    
00156   virtual 
00157   size_t
00158   GetTimeStampOnMeshSize(const std::string& theMeshName, 
00159                          const VISU::TEntity& theEntity,
00160                          const std::string& theFieldName,
00161                          int theTimeStampNumber,
00162                          bool& theIsEstimated) = 0;
00163     
00165   virtual 
00166   size_t
00167   GetTimeStampOnGaussPtsSize(const std::string& theMeshName, 
00168                              const VISU::TEntity& theEntity,
00169                              const std::string& theFieldName,
00170                              int theTimeStampNumber,
00171                              bool& theIsEstimated) = 0;
00172     
00174   virtual 
00175   size_t
00176   GetFieldOnMeshSize(const std::string& theMeshName, 
00177                      const VISU::TEntity& theEntity,
00178                      const std::string& theFieldName) = 0;
00179   
00181   virtual
00182   const VISU::PField 
00183   GetField(const std::string& theMeshName, 
00184            VISU::TEntity theEntity, 
00185            const std::string& theFieldName) = 0;
00186   
00188   virtual
00189   const VISU::PValForTime 
00190   GetTimeStamp(const std::string& theMeshName, 
00191                const VISU::TEntity& theEntity,
00192                const std::string& theFieldName,
00193                int theTimeStampNumber) = 0;
00194     
00196   static 
00197   std::string 
00198   GenerateName(const VISU::TTime& aTime);
00199 
00200   static 
00201   std::string 
00202   GenerateName(const std::string& theName, unsigned int theTimeId);
00203 
00204 protected:
00205   VISU_Convertor();
00206   
00207   std::string myName;
00208   VISU::TMeshMap myMeshMap;
00209   int myIsDone;
00210 };
00211 
00212 extern "C"
00213 {
00215   VISU_CONVERTOR_EXPORT
00216   VISU_Convertor*
00217   CreateConvertor(const std::string& theFileName);
00218 };
00219 
00220 
00221 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS