1 // Created on: 1993-01-21
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
22 #include <GeomTools.ixx>
24 #include <GeomTools_SurfaceSet.hxx>
25 #include <GeomTools_CurveSet.hxx>
26 #include <GeomTools_Curve2dSet.hxx>
27 #include <GeomTools_UndefinedTypeHandler.hxx>
29 static Handle(GeomTools_UndefinedTypeHandler) theActiveHandler = new GeomTools_UndefinedTypeHandler;
31 void GeomTools::Dump(const Handle(Geom_Surface)& S, Standard_OStream& OS)
33 GeomTools_SurfaceSet::PrintSurface(S,OS);
36 void GeomTools::Write(const Handle(Geom_Surface)& S, Standard_OStream& OS)
38 GeomTools_SurfaceSet::PrintSurface(S,OS,Standard_True);
41 void GeomTools::Read(Handle(Geom_Surface)& S, Standard_IStream& IS)
43 GeomTools_SurfaceSet::ReadSurface(IS,S);
46 void GeomTools::Dump(const Handle(Geom_Curve)& C, Standard_OStream& OS)
48 GeomTools_CurveSet::PrintCurve(C,OS);
51 void GeomTools::Write(const Handle(Geom_Curve)& C, Standard_OStream& OS)
53 GeomTools_CurveSet::PrintCurve(C,OS,Standard_True);
56 void GeomTools::Read(Handle(Geom_Curve)& C, Standard_IStream& IS)
58 GeomTools_CurveSet::ReadCurve(IS,C);
61 void GeomTools::Dump(const Handle(Geom2d_Curve)& C, Standard_OStream& OS)
63 GeomTools_Curve2dSet::PrintCurve2d(C,OS);
66 void GeomTools::Write(const Handle(Geom2d_Curve)& C, Standard_OStream& OS)
68 GeomTools_Curve2dSet::PrintCurve2d(C,OS,Standard_True);
71 void GeomTools::Read(Handle(Geom2d_Curve)& C, Standard_IStream& IS)
73 GeomTools_Curve2dSet::ReadCurve2d(IS,C);
76 //=======================================================================
77 //function : SetUndefinedTypeHandler
79 //=======================================================================
81 void GeomTools::SetUndefinedTypeHandler(const Handle(GeomTools_UndefinedTypeHandler)& aHandler)
83 if(!aHandler.IsNull())
84 theActiveHandler = aHandler;
87 //=======================================================================
88 //function : GetUndefinedTypeHandler
90 //=======================================================================
92 Handle(GeomTools_UndefinedTypeHandler) GeomTools::GetUndefinedTypeHandler()
94 return theActiveHandler;