Version: 6.3.1

src/SMESH_I/SMESH_PythonDump.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 #ifndef _SMESH_PYTHONDUMP_HXX_
00024 #define _SMESH_PYTHONDUMP_HXX_
00025 
00026 #include "SMESH.hxx"
00027 
00028 #include <SALOMEconfig.h>
00029 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00030 #include CORBA_SERVER_HEADER(SALOMEDS)
00031 
00032 #include <sstream>
00033 
00034 class SMESH_Gen_i;
00035 class SMESH_MeshEditor_i;
00036 class TCollection_AsciiString;
00037 class Resource_DataMapOfAsciiStringAsciiString;
00038 
00039 // ===========================================================================================
00045 // ===========================================================================================
00046 
00047 class SMESH_2smeshpy
00048 {
00049 public:
00057   static TCollection_AsciiString
00058   ConvertScript(const TCollection_AsciiString& theScript,
00059                 Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
00060                 Resource_DataMapOfAsciiStringAsciiString& theObjectNames);
00061 
00066   static const char* SmeshpyName() { return "smesh"; }
00067   static const char* GenName() { return "smesh"; }
00068 };
00069 
00070 namespace SMESH
00071 {
00072   class FilterLibrary_i;
00073   class FilterManager_i;
00074   class Filter_i;
00075   class Functor_i;
00076   class Measurements_i;
00077 
00078 // ===========================================================================================
00082 // ===========================================================================================
00083 
00084   class SMESH_I_EXPORT TPythonDump
00085   {
00086     std::ostringstream myStream;
00087     static size_t myCounter;
00088   public:
00089     TPythonDump();
00090     virtual ~TPythonDump();
00091 
00092     TPythonDump&
00093     operator<<(long int theArg);
00094 
00095     TPythonDump&
00096     operator<<(int theArg);
00097 
00098     TPythonDump&
00099     operator<<(double theArg);
00100 
00101     TPythonDump&
00102     operator<<(float theArg);
00103 
00104     TPythonDump&
00105     operator<<(const void* theArg);
00106 
00107     TPythonDump&
00108     operator<<(const char* theArg);
00109 
00110     TPythonDump&
00111     operator<<(const SMESH::ElementType& theArg);
00112 
00113     TPythonDump&
00114     operator<<(const SMESH::GeometryType& theArg);
00115 
00116     TPythonDump&
00117     operator<<(const SMESH::long_array& theArg);
00118 
00119     TPythonDump&
00120     operator<<(const SMESH::double_array& theArg);
00121 
00122     TPythonDump&
00123     operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
00124 
00125     TPythonDump&
00126     operator<<(SMESH::SMESH_IDSource_ptr theArg);
00127 
00128     TPythonDump&
00129     operator<<(SALOMEDS::SObject_ptr theArg);
00130 
00131     TPythonDump&
00132     operator<<(CORBA::Object_ptr theArg);
00133 
00134     TPythonDump&
00135     operator<<(SMESH::FilterLibrary_i* theArg);
00136 
00137     TPythonDump&
00138     operator<<(SMESH::FilterManager_i* theArg);
00139 
00140     TPythonDump&
00141     operator<<(SMESH::Filter_i* theArg);
00142 
00143     TPythonDump&
00144     operator<<(SMESH::Functor_i* theArg);
00145 
00146     TPythonDump&
00147     operator<<(SMESH::Measurements_i* theArg);
00148 
00149     TPythonDump&
00150     operator<<(SMESH_Gen_i* theArg);
00151 
00152     TPythonDump&
00153     operator<<(SMESH_MeshEditor_i* theArg);
00154 
00155     TPythonDump&
00156     operator<<(SMESH::MED_VERSION theArg);
00157 
00158     TPythonDump&
00159     operator<<(const SMESH::AxisStruct & theAxis);
00160 
00161     TPythonDump&
00162     operator<<(const SMESH::DirStruct & theDir);
00163 
00164     TPythonDump&
00165     operator<<(const TCollection_AsciiString & theArg);
00166 
00167     TPythonDump&
00168     operator<<(const SMESH::ListOfGroups& theList);
00169 
00170     TPythonDump&
00171     operator<<(const SMESH::ListOfGroups * theList);
00172 
00173     TPythonDump&
00174     operator<<(const SMESH::ListOfIDSources& theList);
00175 
00176     static const char* SMESHGenName() { return "smeshgen"; }
00177     static const char* MeshEditorName() { return "mesh_editor"; }
00178 
00185     static TCollection_AsciiString LongStringStart(const char* type);
00191     static TCollection_AsciiString LongStringEnd();
00203     static bool  CutoutLongString( TCollection_AsciiString & theText,
00204                                    int                     & theFrom,
00205                                    TCollection_AsciiString & theLongString,
00206                                    TCollection_AsciiString & theStringType);
00207   };
00208 }
00209 
00210 #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