b311480e |
1 | -- Created on: 1993-09-07 |
2 | -- Created by: GG |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
b311480e |
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. |
7fd59977 |
10 | -- |
b311480e |
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. |
7fd59977 |
13 | -- |
b311480e |
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 | class TypeMap from Aspect inherits TShared from MMgt |
23 | |
24 | ---Version: 0.0 |
25 | |
26 | ---Purpose: This class defines a TypeMap object. |
27 | ---Keywords: |
28 | ---Warning: |
29 | ---References: |
30 | uses |
31 | LineStyle from Aspect, |
32 | TypeMapEntry from Aspect, |
33 | SequenceOfTypeMapEntry from Aspect |
34 | |
35 | raises |
36 | BadAccess from Aspect |
37 | |
38 | is |
39 | Create returns mutable TypeMap from Aspect; |
40 | |
41 | AddEntry (me : mutable; AnEntry : TypeMapEntry from Aspect) |
42 | ---Level: Public |
43 | ---Purpose: Adds an entry in the type map <me>. |
44 | -- Warning: Raises BadAccess if TypeMap size is exceeded. |
45 | raises BadAccess from Aspect; |
46 | |
47 | AddEntry (me : mutable; aStyle : LineStyle from Aspect) |
48 | returns Integer from Standard; |
49 | ---Level: Public |
50 | ---Purpose: Search an identical type style entry in the type map <me> |
51 | -- and returns the TypeMapEntry Index if exist. |
52 | -- Or add a new entry and returns the computed TypeMapEntry index used. |
53 | |
54 | Size( me ) returns Integer from Standard is static; |
55 | ---Level: Public |
56 | ---Purpose: Returns the Allocated typemap Size |
57 | |
58 | Index( me ; aTypemapIndex : Integer ) returns Integer from Standard |
59 | ---Level: Public |
60 | ---Purpose: Returns the TypeMapEntry.Index of the TypeMap |
61 | -- at rank <aTypemapIndex> . |
62 | raises BadAccess from Aspect is static; |
63 | ---Trigger: Raises BadAccess if the index less than 1 or |
64 | -- greater than Size. |
65 | |
66 | Dump( me ) ; |
67 | |
68 | Entry ( me ; |
69 | AnIndex : Integer from Standard ) |
70 | returns TypeMapEntry from Aspect |
71 | ---Level: Public |
72 | ---Purpose: Returns the Type map entry with the index <AnIndex>. |
73 | -- Warning: Raises BadAccess if the index less than 1 or |
74 | -- greater than Size. |
75 | raises BadAccess from Aspect is static; |
76 | ---C++: return const & |
77 | |
78 | fields |
79 | |
80 | mydata : SequenceOfTypeMapEntry from Aspect is protected; |
81 | |
82 | end TypeMap ; |