1 -- Created on: 1993-05-10
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class GeneralModule from IGESData
18 inherits GeneralModule from Interface
20 ---Purpose : Definition of General Services adapted to IGES.
21 -- This Services comprise : Shared & Implied Lists, Copy, Check
22 -- They are adapted according to the organisation of IGES
23 -- Entities : Directory Part, Lists of Associativities and
24 -- Properties are specifically processed
26 uses Transient, HAsciiString from TCollection,
27 InterfaceModel, Check, ShareTool, EntityIterator, CopyTool,
28 IGESEntity, DirChecker
32 FillSharedCase (me; CN : Integer; ent : Transient;
33 iter : in out EntityIterator);
34 ---Purpose : Fills the list of Entities shared by an IGESEntity <ent>,
35 -- according a Case Number <CN> (formerly computed by CaseNum).
36 -- Considers Properties and Directory Part, and calls
37 -- OwnSharedCase (which is adapted to each Type of Entity)
39 OwnSharedCase (me; CN : Integer; ent : IGESEntity;
40 iter : in out EntityIterator) is deferred;
41 ---Purpose : Lists the Entities shared by a given IGESEntity <ent>, from
42 -- its specific parameters : specific for each type
44 ListImpliedCase (me; CN : Integer; ent : Transient;
45 iter : in out EntityIterator) is redefined;
46 ---Purpose : Lists the Implied References of <ent>. Here, these are the
47 -- Associativities, plus the Entities defined by OwnSharedCase
49 OwnImpliedCase (me; CN : Integer; ent : IGESEntity;
50 iter : in out EntityIterator) is virtual;
51 ---Purpose : Specific list of Entities implied by a given IGESEntity <ent>
52 -- (in addition to Associativities). By default, there are none,
53 -- but this method can be redefined as required
57 CheckCase (me; CN : Integer; ent : Transient; shares : ShareTool;
59 ---Purpose : Semantic Checking of an IGESEntity. Performs general Checks,
60 -- which use DirChecker, then call OwnCheck which does a check
61 -- specific for each type of Entity
63 DirChecker (me; CN : Integer; ent : IGESEntity) returns DirChecker
65 ---Purpose : Returns a DirChecker, specific for each type of Entity
66 -- (identified by its Case Number) : this DirChecker defines
67 -- constraints which must be respected by the DirectoryPart
69 OwnCheckCase (me; CN : Integer; ent : IGESEntity; shares : ShareTool;
70 ach : in out Check) is deferred;
71 ---Purpose : Performs Specific Semantic Check for each type of Entity
74 CanCopy (me; CN : Integer; ent : Transient) returns Boolean is redefined;
75 ---Purpose : Specific answer to the question "is Copy properly implemented"
76 -- For IGES, answer is always True
78 NewVoid (me; CN : Integer; entto : out Transient)
79 returns Boolean is deferred;
80 ---Purpose : Specific creation of a new void entity
82 CopyCase (me; CN : Integer;
83 entfrom : Transient; entto : Transient;
84 TC : in out CopyTool);
85 ---Purpose : Copy ("Deep") from <entfrom> to <entto> (same type)
86 -- by using a CopyTool which provides its working Map.
87 -- For IGESEntities, Copies general data (Directory Part, List of
88 -- Properties) and call OwnCopyCase
90 OwnCopyCase (me; CN : Integer;
91 entfrom : IGESEntity; entto : IGESEntity;
92 TC : in out CopyTool) is deferred;
93 ---Purpose : Copies parameters which are specific of each Type of Entity
95 RenewImpliedCase (me; CN : Integer;
96 entfrom : Transient; entto : Transient;
97 TC : CopyTool) is redefined;
98 ---Purpose : Renewing of Implied References.
99 -- For IGESEntities, Copies general data(List of Associativities)
100 -- and calls OwnRenewCase
102 OwnRenewCase (me; CN : Integer;
103 entfrom : IGESEntity; entto : IGESEntity;
104 TC : CopyTool) is virtual;
105 ---Purpose : Renews parameters which are specific of each Type of Entity :
106 -- the provided default does nothing, but this method may be
107 -- redefined as required
109 WhenDeleteCase (me; CN : Integer;
110 ent : Transient; dispatched : Boolean) is redefined;
111 ---Purpose : Prepares an IGES Entity for delete : works on directory part
112 -- then calls OwnDeleteCase
113 -- While dispatch requires to copy the entities, <dispatched> is
114 -- ignored, entities are cleared in any case
116 OwnDeleteCase (me; CN : Integer;
117 ent : IGESEntity) is virtual;
118 ---Purpose : Specific preparation for delete, acts on own parameters
119 -- Default does nothing, to be redefined as required
121 Name (me; CN : Integer; ent : Transient; shares : ShareTool from Interface)
122 returns HAsciiString from TCollection is redefined virtual;
123 ---Purpose : Returns the name of an IGES Entity (its NameValue)
124 -- Can be redefined for an even more specific case ...