b311480e |
1 | -- Created on: 1999-11-18 |
2 | -- Created by: Andrey BETENEV |
3 | -- Copyright (c) 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 | |
17 | class AP203Context from STEPConstruct |
18 | |
19 | ---Purpose: Maintains context specific for AP203 (required data and |
20 | -- management information such as persons, dates, approvals etc.) |
21 | -- It contains static entities (which can be shared), default |
22 | -- values for person and organisation, and also provides |
23 | -- tool for creating management entities around specific part (SDR). |
24 | |
25 | uses |
26 | Approval from StepBasic, |
27 | DateAndTime from StepBasic, |
28 | PersonAndOrganization from StepBasic, |
29 | SecurityClassificationLevel from StepBasic, |
30 | PersonAndOrganizationRole from StepBasic, |
31 | DateTimeRole from StepBasic, |
32 | ApprovalRole from StepBasic, |
33 | CcDesignPersonAndOrganizationAssignment from StepAP203, |
34 | CcDesignSecurityClassification from StepAP203, |
35 | CcDesignDateAndTimeAssignment from StepAP203, |
36 | CcDesignApproval from StepAP203, |
37 | ApprovalPersonOrganization from StepBasic, |
38 | ApprovalDateTime from StepBasic, |
39 | ShapeDefinitionRepresentation from StepShape, |
40 | NextAssemblyUsageOccurrence from StepRepr, |
41 | ProductCategoryRelationship from StepBasic, |
42 | Part from STEPConstruct |
43 | |
44 | is |
45 | Create returns AP203Context from STEPConstruct; |
46 | ---Purpose: Creates tool and fills constant fields |
47 | |
48 | --- Entities shared by others by default |
49 | |
50 | DefaultApproval (me: in out) returns Approval from StepBasic; |
51 | ---Purpose: Returns default approval entity which |
52 | -- is used when no other data are available |
53 | SetDefaultApproval (me: in out; app: Approval from StepBasic); |
54 | ---Purpose: Sets default approval |
55 | |
56 | DefaultDateAndTime (me: in out) returns DateAndTime from StepBasic; |
57 | ---Purpose: Returns default date_and_time entity which |
58 | -- is used when no other data are available |
59 | SetDefaultDateAndTime (me: in out; dt: DateAndTime from StepBasic); |
60 | ---Purpose: Sets default date_and_time entity |
61 | |
62 | DefaultPersonAndOrganization (me: in out) returns PersonAndOrganization from StepBasic; |
63 | ---Purpose: Returns default person_and_organization entity which |
64 | -- is used when no other data are available |
65 | SetDefaultPersonAndOrganization (me: in out; po: PersonAndOrganization from StepBasic); |
66 | ---Purpose: Sets default person_and_organization entity |
67 | |
68 | DefaultSecurityClassificationLevel (me: in out) returns SecurityClassificationLevel from StepBasic; |
69 | ---Purpose: Returns default security_classification_level entity which |
70 | -- is used when no other data are available |
71 | SetDefaultSecurityClassificationLevel (me: in out; sc: SecurityClassificationLevel from StepBasic); |
72 | ---Purpose: Sets default security_classification_level |
73 | |
74 | RoleCreator (me) returns PersonAndOrganizationRole from StepBasic; |
75 | RoleDesignOwner (me) returns PersonAndOrganizationRole from StepBasic; |
76 | RoleDesignSupplier (me) returns PersonAndOrganizationRole from StepBasic; |
77 | RoleClassificationOfficer (me) returns PersonAndOrganizationRole from StepBasic; |
78 | RoleCreationDate (me) returns DateTimeRole from StepBasic; |
79 | RoleClassificationDate (me) returns DateTimeRole from StepBasic; |
80 | RoleApprover (me) returns ApprovalRole from StepBasic; |
81 | ---Purpose: Return predefined PersonAndOrganizationRole and DateTimeRole |
82 | -- entities named 'creator', 'design owner', 'design supplier', |
83 | -- 'classification officer', 'creation date', 'classification date', |
84 | -- 'approver' |
85 | |
86 | --- Entities instantiated for each part |
87 | |
88 | Init (me: in out; sdr: ShapeDefinitionRepresentation from StepShape); |
89 | ---Purpose: Takes SDR (part) which brings all standard data around part |
90 | -- (common for AP203 and AP214) and creates all the additional |
91 | -- entities required for AP203 |
92 | |
93 | Init (me: in out; SDRTool: Part from STEPConstruct); |
94 | ---Purpose: Takes tool which describes standard data around part |
95 | -- (common for AP203 and AP214) and creates all the additional |
96 | -- entities required for AP203 |
97 | -- |
98 | -- The created entities can be obtained by calls to methods |
99 | -- GetCreator(), GetDesignOwner(), GetDesignSupplier(), |
100 | -- GetClassificationOfficer(), GetSecurity(), GetCreationDate(), |
101 | -- GetClassificationDate(), GetApproval(), |
102 | -- GetApprover(), GetApprovalDateTime(), |
103 | -- GetProductCategoryRelationship() |
104 | |
105 | Init (me: in out; nauo: NextAssemblyUsageOccurrence from StepRepr); |
106 | ---Purpose: Takes NAUO which describes assembly link to component |
107 | -- and creates the security_classification entity associated to |
108 | -- it as required by the AP203 |
109 | -- |
110 | -- Instantiated (or existing previously) entities concerned |
111 | -- can be obtained by calls to methods |
112 | -- GetClassificationOfficer(), GetSecurity(), |
113 | -- GetClassificationDate(), GetApproval(), |
114 | -- GetApprover(), GetApprovalDateTime() |
115 | |
116 | -- Init (me: in out; SDRTool: Part from STEPConstruct; |
117 | -- Model: InterfaceModel from Interface); |
118 | ---Purpose: Takes tool which describes standard data around part |
119 | -- (common for AP203 and AP214) and takes from model (or creates |
120 | -- if missing) all the additional entities required by AP203 |
121 | |
122 | GetCreator (me) returns CcDesignPersonAndOrganizationAssignment from StepAP203; |
123 | GetDesignOwner (me) returns CcDesignPersonAndOrganizationAssignment from StepAP203; |
124 | GetDesignSupplier (me) returns CcDesignPersonAndOrganizationAssignment from StepAP203; |
125 | GetClassificationOfficer (me) returns CcDesignPersonAndOrganizationAssignment from StepAP203; |
126 | GetSecurity (me) returns CcDesignSecurityClassification from StepAP203; |
127 | GetCreationDate (me) returns CcDesignDateAndTimeAssignment from StepAP203; |
128 | GetClassificationDate (me) returns CcDesignDateAndTimeAssignment from StepAP203; |
129 | GetApproval (me) returns CcDesignApproval from StepAP203; |
130 | GetApprover (me) returns ApprovalPersonOrganization from StepBasic; |
131 | GetApprovalDateTime (me) returns ApprovalDateTime from StepBasic; |
132 | GetProductCategoryRelationship (me) returns ProductCategoryRelationship from StepBasic; |
133 | ---Purpose: Return entities (roots) instantiated for the part by method Init |
134 | |
135 | --- Advanced (rather internal) methods |
136 | |
137 | Clear (me: in out); |
138 | ---Purpose: Clears all fields describing entities specific to each part |
139 | |
140 | InitRoles (me: in out); |
141 | ---Purpose: Initializes constant fields (shared entities) |
142 | |
143 | InitPart (me: in out; SDRTool: Part from STEPConstruct) is private; |
144 | ---Purpose: Initializes all missing data which are required for part |
145 | |
146 | InitAssembly (me: in out; nauo: NextAssemblyUsageOccurrence from StepRepr); |
147 | ---Purpose: Initializes all missing data which are required for assembly |
148 | |
149 | InitSecurityRequisites (me: in out); |
150 | ---Purpose: Initializes ClassificationOfficer and ClassificationDate |
151 | -- entities according to Security entity |
152 | |
153 | InitApprovalRequisites (me: in out); |
154 | ---Purpose: Initializes Approver and ApprovalDateTime |
155 | -- entities according to Approval entity |
156 | |
157 | fields |
158 | |
159 | -- default values (to be replaced by some meaningful externally) |
160 | defApproval : Approval from StepBasic; |
161 | defDateAndTime : DateAndTime from StepBasic; |
162 | defPersonAndOrganization : PersonAndOrganization from StepBasic; |
163 | defSecurityClassificationLevel: SecurityClassificationLevel from StepBasic; |
164 | |
165 | -- predefined roles |
166 | roleCreator : PersonAndOrganizationRole from StepBasic; |
167 | roleDesignOwner : PersonAndOrganizationRole from StepBasic; |
168 | roleDesignSupplier : PersonAndOrganizationRole from StepBasic; |
169 | roleClassificationOfficer: PersonAndOrganizationRole from StepBasic; |
170 | roleCreationDate : DateTimeRole from StepBasic; |
171 | roleClassificationDate : DateTimeRole from StepBasic; |
172 | roleApprover : ApprovalRole from StepBasic; |
173 | |
174 | -- entities created for each part (roots) |
175 | myCreator : CcDesignPersonAndOrganizationAssignment from StepAP203; |
176 | myDesignOwner : CcDesignPersonAndOrganizationAssignment from StepAP203; |
177 | myDesignSupplier : CcDesignPersonAndOrganizationAssignment from StepAP203; |
178 | myClassificationOfficer : CcDesignPersonAndOrganizationAssignment from StepAP203; |
179 | mySecurity : CcDesignSecurityClassification from StepAP203; |
180 | myCreationDate : CcDesignDateAndTimeAssignment from StepAP203; |
181 | myClassificationDate : CcDesignDateAndTimeAssignment from StepAP203; |
182 | myApproval : CcDesignApproval from StepAP203; |
183 | |
184 | myApprover : ApprovalPersonOrganization from StepBasic; |
185 | myApprovalDateTime : ApprovalDateTime from StepBasic; |
186 | |
187 | myProductCategoryRelationship: ProductCategoryRelationship from StepBasic; |
188 | |
189 | end AP203Context; |