0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / GeomTools / GeomTools.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-08-28
2// Created by: Remi LEQUETTE
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _GeomTools_HeaderFile
18#define _GeomTools_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_OStream.hxx>
25#include <Standard_IStream.hxx>
26#include <Standard_Real.hxx>
27class Geom_Surface;
28class Geom_Curve;
29class Geom2d_Curve;
30class GeomTools_UndefinedTypeHandler;
31class GeomTools_UndefinedTypeHandler;
32class GeomTools_SurfaceSet;
33class GeomTools_CurveSet;
34class GeomTools_Curve2dSet;
35
36
37//! The GeomTools package provides utilities for Geometry.
38//!
39//! * SurfaceSet, CurveSet, Curve2dSet : Tools used
40//! for dumping, writing and reading.
41//!
42//! * Methods to dump, write, read curves and surfaces.
43class GeomTools
44{
45public:
46
47 DEFINE_STANDARD_ALLOC
48
49
50 //! A set of Curves from Geom2d.
51 //! Dumps the surface on the stream.
52 Standard_EXPORT static void Dump (const Handle(Geom_Surface)& S, Standard_OStream& OS);
53
54 //! Writes the surface on the stream.
55 Standard_EXPORT static void Write (const Handle(Geom_Surface)& S, Standard_OStream& OS);
56
57 //! Reads the surface from the stream.
58 Standard_EXPORT static void Read (Handle(Geom_Surface)& S, Standard_IStream& IS);
59
60 //! Dumps the Curve on the stream.
61 Standard_EXPORT static void Dump (const Handle(Geom_Curve)& C, Standard_OStream& OS);
62
63 //! Writes the Curve on the stream.
64 Standard_EXPORT static void Write (const Handle(Geom_Curve)& C, Standard_OStream& OS);
65
66 //! Reads the Curve from the stream.
67 Standard_EXPORT static void Read (Handle(Geom_Curve)& C, Standard_IStream& IS);
68
69 //! Dumps the Curve on the stream.
70 Standard_EXPORT static void Dump (const Handle(Geom2d_Curve)& C, Standard_OStream& OS);
71
72 //! Writes the Curve on the stream.
73 Standard_EXPORT static void Write (const Handle(Geom2d_Curve)& C, Standard_OStream& OS);
74
75 //! Reads the Curve from the stream.
76 Standard_EXPORT static void Read (Handle(Geom2d_Curve)& C, Standard_IStream& IS);
77
78 Standard_EXPORT static void SetUndefinedTypeHandler (const Handle(GeomTools_UndefinedTypeHandler)& aHandler);
79
80 Standard_EXPORT static Handle(GeomTools_UndefinedTypeHandler) GetUndefinedTypeHandler();
81
82 //! Reads the Standard_Real value from the stream. Zero is read
83 //! in case of error
84 Standard_EXPORT static void GetReal (Standard_IStream& IS, Standard_Real& theValue);
85
86
87
88
89protected:
90
91
92
93
94
95private:
96
97
98
99
100friend class GeomTools_UndefinedTypeHandler;
101friend class GeomTools_SurfaceSet;
102friend class GeomTools_CurveSet;
103friend class GeomTools_Curve2dSet;
104
105};
106
107
108
109
110
111
112
113#endif // _GeomTools_HeaderFile