0023024: Update headers of OCCT files
[occt.git] / src / Aspect / Aspect_GenericColorMap.cdl
1 -- Created on: 1993-03-23
2 -- Created by: BBL
3 -- Copyright (c) 1993-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
21
22 class GenericColorMap from Aspect inherits ColorMap from Aspect
23
24         ---Version: 0.0
25
26         ---Level: Public
27         ---Purpose: This class defines a GenericColorMap object.
28         ---Keywords:
29         ---Warning:
30         ---References:
31
32 uses
33         Color                   from Quantity,
34         TypeOfColorMap          from Aspect,
35         ColorMapEntry           from Aspect,
36         DataMapOfIntegerInteger from TColStd
37
38 raises
39
40         BadAccess       from Aspect
41
42 is
43
44         Create
45                 returns mutable GenericColorMap from Aspect;
46         ---Level: Public
47         ---Purpose: Creates a generic ColorMap .
48
49         AddEntry (me : mutable; AnEntry : ColorMapEntry from Aspect)
50         ---Level: Public
51         ---Purpose: Adds an entry in the color map <me>.
52         --  Warning: Raises BadAccess if the ColorMapEntry index is alreadry 
53         --          defined.
54         raises BadAccess from Aspect;
55
56         AddEntry (me : mutable; aColor : Color from Quantity)
57                                         returns Integer from Standard;
58         ---Level: Public
59         ---Purpose: Search an identical color entry in the color map <me>
60         -- and returns the ColorMapEntry Index if exist.
61         -- Or add a new entry and returns the computed ColorMapEntry index used. 
62         RemoveEntry ( me: mutable;
63                       AColorMapEntryIndex : Integer from Standard )
64                 raises BadAccess from Aspect ;
65         ---Level: Public
66         ---Purpose: Remove the ColorMapEntry at position index in the ColorMap 
67         --  Warning: Raises BadAccess if the index is not defined in the
68         --          ColorMap.
69
70         FindColorMapIndex ( me ; AColorMapEntryIndex : Integer from Standard )
71                 returns Integer from Standard
72                 raises BadAccess from Aspect ;
73         ---Level: Public
74         ---Purpose: Returns the index in the ColorMap of the 
75         --          ColorMapEntry.Index() equal to <AnEntryIndex>.
76         --  Warning: Raises BadAccess if the index is not defined in the
77         --          ColorMap.
78
79         FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
80                 returns ColorMapEntry from Aspect
81                 raises BadAccess from Aspect ;
82         ---Level: Public
83         ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
84         --          equal to <AnEntryIndex>.
85         --  Warning: Raises BadAccess if the index is not defined in the
86         --          ColorMap.
87         ---C++: return const &
88
89         NearestColorMapIndex( me ; aColor : Color from Quantity )
90                 returns Integer from Standard ;
91         ---Level: Public
92         ---Purpose: Returns the index in the ColorMap of the
93         --          nearest matching ColorMapEntry 
94
95         NearestEntry( me ; aColor : Color from Quantity )
96                 returns ColorMapEntry from Aspect ;
97         ---Level: Public
98         ---Purpose: Returns the nearest ColorMapEntry that match aColor .
99         ---C++: return const &
100
101 fields
102
103         myDataMap : DataMapOfIntegerInteger from TColStd is protected;
104
105 end GenericColorMap;