b311480e |
1 | -- Created on: 1997-05-09 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1997-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | class Simple from StepData inherits Described from StepData |
24 | |
25 | ---Purpose : A Simple Entity is defined by a type (which can heve super |
26 | -- types) and a list of parameters |
27 | |
28 | uses CString, |
29 | Check from Interface, EntityIterator from Interface, |
30 | ESDescr from StepData, |
31 | Field from StepData, FieldListN from StepData |
32 | |
33 | raises InterfaceMismatch |
34 | |
35 | is |
36 | |
37 | Create (descr : ESDescr) returns mutable Simple; |
38 | ---Purpose : Creates a Simple Entity |
39 | |
40 | ESDescr (me) returns ESDescr; |
41 | ---Purpose : Returns description, as for simple |
42 | |
43 | StepType (me) returns CString; |
44 | ---Purpose : Returns the recorded StepType (TypeName of its ESDescr) |
45 | |
46 | -- inherited |
47 | |
48 | IsComplex (me) returns Boolean; |
49 | ---Purpose : Returns False |
50 | |
51 | |
52 | Matches (me; steptype : CString) returns Boolean; |
53 | ---Purpose : Tells if a step type is matched by <me> |
54 | -- For a Simple Entity : own type or super type |
55 | -- For a Complex Entity : one of the members |
56 | |
57 | As (me; steptype : CString) returns mutable Simple; |
58 | ---Purpose : Returns a Simple Entity which matches with a Type in <me> : |
59 | -- For a Simple Entity : me if it matches, else a null handle |
60 | -- For a Complex Entity : the member which matches, else null |
61 | |
62 | HasField (me; name : CString) returns Boolean; |
63 | ---Purpose : Tells if a Field brings a given name |
64 | |
65 | Field (me; name : CString) returns Field |
66 | ---Purpose : Returns a Field from its name; read-only |
67 | raises InterfaceMismatch; |
68 | -- raises if no Field for <name> |
69 | ---C++ : return const & |
70 | |
71 | CField (me : mutable; name : CString) returns Field |
72 | ---Purpose : Returns a Field from its name; read or write |
73 | raises InterfaceMismatch; |
74 | -- raises if no Field for <name> |
75 | ---C++ : return & |
76 | |
77 | -- more specific |
78 | |
79 | NbFields (me) returns Integer; |
80 | ---Purpose : Returns the count of fields |
81 | |
82 | FieldNum (me; num : Integer) returns Field; |
83 | ---Purpose : Returns a field from its rank, for read-only use |
84 | ---C++ : return const & |
85 | |
86 | CFieldNum (me : mutable; num : Integer) returns Field; |
87 | ---Purpose : Returns a field from its rank, in order to modify it |
88 | ---C++ : return & |
89 | |
90 | Fields (me) returns FieldListN; |
91 | ---Purpose : Returns the entire field list, read-only |
92 | ---C++ : return const & |
93 | |
94 | CFields (me : mutable) returns FieldListN; |
95 | ---Purpose : Returns the entire field list, read or write |
96 | ---C++ : return & |
97 | |
98 | -- |
99 | |
100 | Check (me; ach : in out Check from Interface); |
101 | ---Purpose : Fills a Check by using its Description |
102 | |
103 | Shared (me; list : in out EntityIterator from Interface); |
104 | ---Purpose : Fills an EntityIterator with entities shared by <me> |
105 | |
106 | fields |
107 | |
108 | thefields : FieldListN; |
109 | |
110 | end Simple; |