0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / StepData / StepData_ReadWriteModule.cdl
CommitLineData
b311480e 1-- Created on: 1993-01-25
2-- Created by: Christian CAILLET
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred class ReadWriteModule from StepData inherits
18 ReaderModule from Interface
19
20 ---Purpose : Defines basic File Access Module (Recognize, Read, Write)
21 -- That is : ReaderModule (Recognize & Read) + Write for
22 -- StepWriter (for a more centralized description)
23 -- Warning : A sub-class of ReadWriteModule, which belongs to a particular
24 -- Protocol, must use the same definition for Case Numbers (give
25 -- the same Value for a StepType defined as a String from a File
26 -- as the Protocol does for the corresponding Entity)
27
28uses Transient, AsciiString from TCollection,
29 SequenceOfAsciiString from TColStd,
30 Check, FileReaderData, StepReaderData, StepWriter
31
32raises DomainError
33
34is
35
36 CaseNum (me; data : FileReaderData; num : Integer) returns Integer;
37 ---Purpose : Translate the Type of record <num> in <data> to a positive
38 -- Case Number, or 0 if failed.
39 -- Works with a StepReaderData, in which the Type of an Entity
40 -- is defined as a String : Reads the RecordType <num> then calls
41 -- CaseNum (this type)
42 -- Warning : The methods CaseStep, StepType and Recognize,
43 -- must be in phase (triplets CaseNum-StepType-Type of Object)
44
45 CaseStep (me; atype : AsciiString from TCollection) returns Integer
46 is deferred;
47 ---Purpose : Defines Case Numbers corresponding to the recognized Types
48 -- Called by CaseNum (data,num) above for a Simple Type Entity
49 -- Warning : CaseStep must give the same Value as Protocol does for the
50 -- Entity type which corresponds to this Type given as a String
51
52 CaseStep (me; types : SequenceOfAsciiString from TColStd) returns Integer
53 is virtual;
54 ---Purpose : Same a above but for a Complex Type Entity ("Plex")
55 -- The provided Default recognizes nothing
56
57
58 IsComplex (me; CN : Integer) returns Boolean is virtual;
59 ---Purpose : Returns True if the Case Number corresponds to a Complex Type
60 -- ("Plex"). Remember that all possible combinations must be
61 -- aknowledged to be processed
62 -- Default is False for all cases. For a Protocol which defines
63 -- possible Plexes, this method must be redefined.
64
65 StepType (me; CN : Integer) returns AsciiString from TCollection
66 is deferred;
67 ---Purpose : Function specific to STEP, which delivers the StepType as it
68 -- is recorded in and read from a File compliant with STEP.
69 -- This method is symmetric to the method CaseStep.
70 -- StepType can be different from Dynamic Type's name, but
71 -- belongs to the same class of Object.
72 -- Returns an empty String if <CN> is zero.
73 -- Warning : For a Complex Type Entity, returns an Empty String
74 -- (Complex Type must be managed by users)
75 ---C++ : return const &
76
77 ShortType (me; CN : Integer) returns AsciiString from TCollection
78 is virtual;
79 ---Purpose : Function specific to STEP. Some STEP Types have a short form
80 -- This method can be redefined to fill it
81 -- By default, returns an empty string, which is then interpreted
82 -- to take normal form from StepType
83
84 ComplexType (me; CN : Integer;
85 types : in out SequenceOfAsciiString from TColStd)
86 returns Boolean is virtual;
87 ---Purpose : Function specific to STEP, which delivers the list of types
88 -- which corresponds to a complex type. If <CN> is not for a
89 -- complex type, this method returns False. Else it returns True
90 -- and fills the list in alphabetic order.
91 -- The default returns False. To be redefined as required.
92
93 Read (me; CN : Integer; data : FileReaderData; num : Integer;
94 ach : in out Check; ent : mutable Transient)
95 raises DomainError;
96 ---Purpose : General Read Function, calls ReadStep
97
98 ReadStep (me; CN : Integer; data : StepReaderData; num : Integer;
99 ach : in out Check; ent : mutable Transient)
100 raises DomainError is deferred;
101 ---Purpose : Specific Read Function. Works with StepReaderData
102
103 WriteStep (me; CN : Integer; SW : in out StepWriter; ent : Transient)
104 is deferred;
105 ---Purpose : Write Function, switched by CaseNum
106
107end ReadWriteModule;