b311480e |
1 | -- Created by: DAUTRY Philippe |
2 | -- Copyright (c) 1997-1999 Matra Datavision |
3 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
4 | -- |
5 | -- The content of this file is subject to the Open CASCADE Technology Public |
6 | -- License Version 6.5 (the "License"). You may not use the content of this file |
7 | -- except in compliance with the License. Please obtain a copy of the License |
8 | -- at http://www.opencascade.org and read it completely before using this file. |
9 | -- |
10 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
12 | -- |
13 | -- The Original Code and all software distributed under the License is |
14 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | -- Initial Developer hereby disclaims all such warranties, including without |
16 | -- limitation, any warranties of merchantability, fitness for a particular |
17 | -- purpose or non-infringement. Please see the License for the specific terms |
18 | -- and conditions governing the rights and limitations under the License. |
19 | |
7fd59977 |
20 | -- ------------------- |
7fd59977 |
21 | |
22 | ---Version: 0.0 |
b311480e |
23 | --Version Date Purpose |
7fd59977 |
24 | -- 0.0 May 6 1997 Creation |
25 | |
26 | |
27 | generic class DriverTable from MDF |
28 | (TheHDriver as Transient from Standard; |
29 | TheDriverHSeq as Transient from Standard; |
30 | TheTypeDriverMap as any) |
31 | inherits TShared from MMgt |
32 | |
33 | ---Purpose: A driver table is an object building links between |
34 | -- object types and object drivers. In the |
35 | -- translation process, a driver table is asked to |
36 | -- give a translation driver for each current object |
37 | -- to be translated. |
38 | -- |
39 | -- Validity range of a driver: a driver is available |
40 | -- from its version number till the next upper |
41 | -- version number. |
42 | |
43 | uses |
44 | |
45 | Type from Standard, |
46 | MapTransientHasher from TColStd |
47 | |
48 | |
49 | -- raises |
50 | |
51 | class DriverList instantiates List from TCollection |
52 | (TheHDriver); |
53 | |
54 | class TypeDriverListMap instantiates DataMap from TCollection |
55 | (Type from Standard, |
56 | DriverList, |
57 | MapTransientHasher from TColStd); |
58 | |
59 | is |
60 | |
61 | Create returns mutable DriverTable from MDF; |
62 | ---Purpose: Creates a mutable DriverTable from MDF. |
63 | |
64 | SetDriver(me : mutable; |
65 | anHDriver : TheHDriver); |
66 | ---Purpose: Sets a translation driver: <aDriver>. |
67 | |
68 | SetDrivers(me : mutable; |
69 | aDriverHSeq : TheDriverHSeq); |
70 | ---Purpose: Sets translation drivers. |
71 | |
72 | GetDrivers(me : mutable; |
73 | aVersion : Integer from Standard = 0) |
74 | returns TheTypeDriverMap; |
75 | ---Purpose: Gets a map of drivers available for <aVersion>. |
76 | -- |
77 | -- If <aVersion> is not given or is null, the highest |
78 | -- version number driver is returned. |
79 | -- |
80 | ---C++: return const & |
81 | |
82 | GetDriver(me; |
83 | aType : Type from Standard; |
84 | anHDriver : in out TheHDriver; |
85 | aVersion : Integer from Standard = 0) |
86 | returns Boolean from Standard; |
87 | ---Purpose: Gets a driver <aDriver> according to <aType> and |
88 | -- <aVersion>. |
89 | -- |
90 | -- If <aVersion> is not given or is null, the highest |
91 | -- version number driver is returned. |
92 | -- |
93 | -- Returns True if a driver is found; false otherwise. |
94 | |
95 | |
96 | fields |
97 | |
98 | myVersion : Integer from Standard; |
99 | myMap : TheTypeDriverMap; -- available for myVersion. |
100 | myMapOfLst : TypeDriverListMap; |
101 | |
102 | end DriverTable; |