0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / IGESData / IGESData_IGESReaderTool.cdl
CommitLineData
b311480e 1-- Created on: 1992-04-06
2-- Created by: Christian CAILLET
3-- Copyright (c) 1992-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--
d5f74e42 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
973c2be1 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
17class IGESReaderTool from IGESData inherits FileReaderTool
18
19 ---Purpose : specific FileReaderTool for IGES
20 -- Parameters are accessed through specific objects, ParamReaders
21
22uses Integer, Boolean, Transient,
23 Check, InterfaceModel, GeneralLib, ReaderLib, ParamList,
24 IGESReaderData, Protocol from IGESData, FileRecognizer,
25 IGESType, IGESEntity, DirPart, ReadStage, ParamReader
26
27is
28
6e33d3ce 29 Create (reader : IGESReaderData; protocol : Protocol from IGESData)
7fd59977 30 returns IGESReaderTool;
31 ---Purpose : creates IGESReaderTool to work with an IGESReaderData and an
32 -- IGES Protocol.
33 -- Actually, no Lib is used
34
35 -- -- General -- --
36
6e33d3ce 37 Prepare (me : in out; reco : FileRecognizer);
7fd59977 38 ---Purpose : binds empty entities to records, works with the Protocol
39 -- (from IGESData) stored and later used
40 -- RQ : Actually, sets DNum into IGES Entities
41 -- Also loads the list of parameters for ParamReader
42
43 Recognize (me : in out; num : Integer;
6e33d3ce 44 ach : in out Check; ent : out Transient)
7fd59977 45 returns Boolean;
46 ---Purpose : recognizes records by asking Protocol (on data of DirType)
47
48 -- Loading the IGESModel --
49
6e33d3ce 50 BeginRead (me : in out; amodel : InterfaceModel);
7fd59977 51 ---Purpose : fills model's header, that is, its GlobalSection
52
53 AnalyseRecord (me : in out;
6e33d3ce 54 num : Integer; anent : Transient; acheck : in out Check)
7fd59977 55 returns Boolean;
56 ---Purpose : fills an entity, given record no; works by calling ReadDirPart
57 -- then ReadParams (with help of a ParamReader), then if required
58 -- ReadProps and ReadAssocs, from IGESEntity
59 -- Returns True if no fail has been recorded
60
6e33d3ce 61 EndRead (me : in out; amodel : InterfaceModel) is redefined;
7fd59977 62 ---Purpose : after reading entities, true line weights can be computed
63
64 -- For each IGESEntity --
65
6e33d3ce 66 ReadDir (me; ent : IGESEntity; IR : IGESReaderData;
7fd59977 67 DP : DirPart; ach : in out Check);
68 ---Purpose : Reads directory part componants from file; DP is the litteral
69 -- directory part, IR detains entities referenced by DP
70
6e33d3ce 71 ReadOwnParams (me; ent : IGESEntity;
7fd59977 72 IR : IGESReaderData; PR : in out ParamReader);
73 ---Purpose : Performs Reading of own Parameters for each IGESEntity
74 -- Works with the ReaderLib loaded with ReadWriteModules for IGES
75 -- In case of failure, tries UndefinedEntity from IGES
76
6e33d3ce 77 ReadProps (me; ent : IGESEntity; IR : IGESReaderData;
7fd59977 78 PR : in out ParamReader);
79 ---Purpose : Reads Property List, if there is (if not, does nothing)
80 -- criterium is : current parameter of PR remains inside params
81 -- list, and Stage is "Own"
82 -- Current parameter must be a positive integer, which value
83 -- gives the length of the list; else, a Fail is produced (into
84 -- Check of PR) and reading process is stopped
85
6e33d3ce 86 ReadAssocs (me; ent : IGESEntity; IR : IGESReaderData;
7fd59977 87 PR : in out ParamReader);
88 ---Purpose : Reads Associativity List, if there is (if not, does nothing)
89 -- criterium is : current parameter of PR remains inside params
90 -- list, and Stage is "Own"
91 -- Same conditions as above; in addition, no parameter must be
92 -- let after the list once read
93 -- Note that "Associated" entities are not declared "Shared"
94
95fields
96
97 thelist : ParamList; -- (loaded once, allows optimization)
98 thereco : FileRecognizer;
99 theglib : GeneralLib;
100 therlib : ReaderLib;
101 thecnum : Integer; -- current entity number for recognize
102 thectyp : IGESType; -- its IGESType (for purpose of optimization)
103 thestep : ReadStage; -- to continue an interrupted party
104 thechk : Check; -- check on header (kept by IGESModel)
105 thegradweight : Integer;
106 themaxweight : Real;
107 thedefweight : Real;
108
109end IGESReaderTool;