1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
20 // ----------------------------------------------------------------------------
22 // File : HOMARD_DriverTools.hxx
23 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
25 // ----------------------------------------------------------------------------
27 #ifndef HOMARD_DRIVERTOOLS_H
28 #define HOMARD_DRIVERTOOLS_H
32 class HOMARD_Boundary;
34 class HOMARD_Iteration;
35 class HOMARD_Hypothesis;
40 //! persistence entity type
41 typedef enum { Case, Zone, Hypothesis, Iteration, Boundary } SignatureType;
43 //! get persistence signature
44 std::string GetSignature( SignatureType type );
46 //! get data separator
47 std::string separator();
49 //! dump boundary to the string
50 std::string Dump( const ::HOMARD_Boundary& boundary );
51 //! dump case to the string
52 std::string Dump( const ::HOMARD_Cas& cas );
53 //! dump iteration to the string
54 std::string Dump( const ::HOMARD_Iteration& iteration );
55 //! dump hypothesis to the string
56 std::string Dump( const ::HOMARD_Hypothesis& hypothesis );
57 //! dump zone to the string
58 std::string Dump( const ::HOMARD_Zone& zone );
60 //! restore boundary from the string
61 bool Restore( ::HOMARD_Boundary& boundary, const std::string& stream );
62 //! restore case from the string
63 bool Restore( ::HOMARD_Cas& cas, const std::string& stream );
64 //! restore hypothesis from the string
65 bool Restore( ::HOMARD_Hypothesis& hypothesis, const std::string& stream );
66 //! restore iteration from the string
67 bool Restore( ::HOMARD_Iteration& iteration, const std::string& stream );
68 //! restore zone from the string
69 bool Restore( ::HOMARD_Zone& zone, const std::string& stream );
72 #endif // HOMARD_DRIVERTOOLS_H