b311480e |
1 | -- Created on: 2004-05-20 |
2 | -- Created by: Sergey ZARITCHNY <szy@opencascade.com> |
973c2be1 |
3 | -- Copyright (c) 2004-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
973c2be1 |
7 | -- This library is free software; you can redistribute it and / or modify it |
8 | -- under the terms of the GNU Lesser General Public version 2.1 as published |
9 | -- by the Free Software Foundation, with special exception defined in the file |
10 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | class CurveSet from BinTools |
17 | |
18 | ---Purpose: Stores a set of Curves from Geom in binary format. |
19 | |
20 | uses |
21 | Curve from Geom, |
22 | IndexedMapOfTransient from TColStd |
23 | |
24 | raises |
25 | OutOfRange from Standard |
26 | |
27 | is |
28 | |
29 | Create returns CurveSet from BinTools; |
30 | ---Purpose: Returns an empty set of Curves. |
31 | |
32 | Clear(me : in out) |
33 | ---Purpose: Clears the content of the set. |
34 | is static; |
35 | |
36 | Add(me : in out; C : Curve from Geom) returns Integer |
37 | ---Purpose: Incorporate a new Curve in the set and returns |
38 | -- its index. |
39 | is static; |
40 | |
41 | Curve(me; I : Integer) returns Curve from Geom |
42 | ---Purpose: Returns the Curve of index <I>. |
43 | raises |
44 | OutOfRange from Standard |
45 | is static; |
46 | |
47 | Index(me; C : Curve from Geom) returns Integer |
48 | ---Purpose: Returns the index of <L>. |
49 | is static; |
50 | |
51 | Write(me; OS : in out OStream) |
52 | ---Purpose: Writes the content of me on the stream <OS> in a |
53 | -- format that can be read back by Read. |
54 | is static; |
55 | |
56 | Read(me : in out; IS : in out IStream) |
57 | ---Purpose: Reads the content of me from the stream <IS>. me |
58 | -- is first cleared. |
59 | -- |
60 | is static; |
61 | |
62 | -- |
63 | -- class methods to write an read curves |
64 | -- |
65 | |
66 | WriteCurve(myclass; C : Curve from Geom; |
67 | OS : in out OStream); |
68 | ---Purpose: Dumps the curve on the stream in binary format |
69 | -- that can be read back. |
70 | |
71 | ReadCurve(myclass; IS : in out IStream; |
72 | C : in out Curve from Geom) |
73 | returns IStream; |
74 | ---Purpose: Reads the curve from the stream. The curve is |
75 | -- assumed to have been written with the Write |
76 | -- method |
77 | -- |
78 | ---C++: return & |
79 | |
80 | fields |
81 | |
82 | myMap : IndexedMapOfTransient from TColStd; |
83 | |
84 | end CurveSet; |