Back to index

salome-geom  6.5.0
GEOM_PythonDump.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 _GEOM_PYTHONDUMP_HXX_
00024 #define _GEOM_PYTHONDUMP_HXX_
00025 
00026 #include <SALOMEconfig.h>
00027 
00028 #include "GEOM_Object.hxx"
00029 #include "GEOM_Function.hxx"
00030 
00031 #include <TCollection_AsciiString.hxx>
00032 
00033 namespace GEOM
00034 {
00035   class TPythonDump
00036   {
00037     std::ostringstream myStream;
00038     static size_t      myCounter;
00039     bool               myAppend;
00040 
00041     Handle(GEOM_Function) myFunction;
00042 
00043   public:
00044     Standard_EXPORT TPythonDump (Handle(GEOM_Function)& theFunction, bool theAppend=false);
00045     Standard_EXPORT virtual ~TPythonDump();
00046 
00047     //operator TCollection_AsciiString () const;
00048 
00049     Standard_EXPORT TPythonDump& operator<< (bool theArg);
00050     Standard_EXPORT TPythonDump& operator<< (long int theArg);
00051     Standard_EXPORT TPythonDump& operator<< (int theArg);
00052     Standard_EXPORT TPythonDump& operator<< (double theArg);
00053     Standard_EXPORT TPythonDump& operator<< (float theArg);
00054     Standard_EXPORT TPythonDump& operator<< (const void* theArg);
00055     Standard_EXPORT TPythonDump& operator<< (const char* theArg);
00056     Standard_EXPORT TPythonDump& operator<< (const TopAbs_ShapeEnum theArg);
00057     Standard_EXPORT TPythonDump& operator<< (const Handle(GEOM_Object)& theObject);
00058   };
00059 
00062   Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(GEOM_Object)& theObj1,
00063                                       const Handle(GEOM_Object)& theObj2);
00064 
00067   Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects);
00068 }
00069 
00070 #endif