0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / IGESData / IGESData_ReadWriteModule.cdl
1 -- Created on: 1993-09-06
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-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 deferred class ReadWriteModule  from IGESData
18       inherits ReaderModule from Interface
19
20     ---Purpose : Defines basic File Access Module, under the control of
21     --           IGESReaderTool for Reading and IGESWriter for Writing :
22     --           Specific actions concern : Read and Write Own Parameters of
23     --           an IGESEntity.           
24     --           The common parts (Directory Entry, Lists of Associativities
25     --           and Properties) are processed by IGESReaderTool & IGESWriter
26     --           
27     --           Each sub-class of ReadWriteModule is used in conjunction with
28     --           a sub-class of Protocol from IGESData and processes several
29     --           types of IGESEntity (typically, them of a package) :
30     --           The Protocol gives a unique positive integer Case Number for
31     --           each type of IGESEntity it recognizes, the corresponding
32     --           ReadWriteModule processes an Entity by using the Case Number
33     --           to known what is to do
34     --           On Reading, the general service NewVoid is used to create an
35     --           IGES Entity the first time
36     --           
37     --  Warning : Works with an IGESReaderData which stores "DE parts" of Items
38
39 uses Transient, FileReaderData, Check,
40      IGESEntity, DirPart, IGESReaderData, ParamReader, IGESWriter
41
42 raises DomainError
43
44 is
45
46     CaseNum (me; data : FileReaderData; num : Integer) returns Integer;
47     ---Purpose : Translates the Type of record <num> in <data> to a positive
48     --           Case Number, or 0 if failed.
49     --           Works with IGESReaderData which provides Type & Form Numbers,
50     --           and calls CaseIGES (see below)
51
52     CaseIGES (me; typenum, formnum : Integer) returns Integer  is deferred;
53     ---Purpose : Defines Case Numbers corresponding to the Entity Types taken
54     --           into account by a sub-class of ReadWriteModule (hence, each
55     --           sub-class of ReadWriteModule has to redefine this method)
56     --           Called by CaseNum. Its result will then be used to call
57     --           Read, etc ...
58
59     Read (me; CN : Integer; data : FileReaderData; num : Integer;
60         ach : in out Check; ent : Transient)
61         raises DomainError;
62     ---Purpose : General Read Function. See IGESReaderTool for more info
63
64     ReadOwnParams (me; CN : Integer; ent : IGESEntity;
65                    IR : IGESReaderData; PR : in out ParamReader)
66         raises DomainError  is deferred;
67     ---Purpose : Reads own parameters from file for an Entity; <PR> gives
68     --           access to them, <IR> detains parameter types and values
69     --           For each class, there must be a specific action provided
70     --           Note that Properties and Associativities Lists are Read by
71     --           specific methods (see below), they are called under control
72     --           of reading process (only one call) according Stage recorded
73     --           in ParamReader
74
75
76     WriteOwnParams (me; CN : Integer; ent : IGESEntity;
77                     IW : in out IGESWriter)
78         is deferred;
79     ---Purpose : Writes own parameters to IGESWriter; defined for each class
80     --           (to be redefined for other IGES ReadWriteModules)
81     --  Warning : Properties and Associativities are directly managed by
82     --           WriteIGES, must not be sent by this method
83
84 end ReadWriteModule;