0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_GenericColorMap.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-23
2-- Created by: BBL
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
7fd59977 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
7fd59977 7--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public version 2.1 as published
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.
7fd59977 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class GenericColorMap from Aspect inherits ColorMap from Aspect
18
19 ---Version: 0.0
20
21 ---Level: Public
22 ---Purpose: This class defines a GenericColorMap object.
23 ---Keywords:
24 ---Warning:
25 ---References:
26
27uses
28 Color from Quantity,
29 TypeOfColorMap from Aspect,
30 ColorMapEntry from Aspect,
31 DataMapOfIntegerInteger from TColStd
32
33raises
34
35 BadAccess from Aspect
36
37is
38
39 Create
40 returns mutable GenericColorMap from Aspect;
41 ---Level: Public
42 ---Purpose: Creates a generic ColorMap .
43
44 AddEntry (me : mutable; AnEntry : ColorMapEntry from Aspect)
45 ---Level: Public
46 ---Purpose: Adds an entry in the color map <me>.
47 -- Warning: Raises BadAccess if the ColorMapEntry index is alreadry
48 -- defined.
49 raises BadAccess from Aspect;
50
51 AddEntry (me : mutable; aColor : Color from Quantity)
52 returns Integer from Standard;
53 ---Level: Public
54 ---Purpose: Search an identical color entry in the color map <me>
55 -- and returns the ColorMapEntry Index if exist.
56 -- Or add a new entry and returns the computed ColorMapEntry index used.
57 RemoveEntry ( me: mutable;
58 AColorMapEntryIndex : Integer from Standard )
59 raises BadAccess from Aspect ;
60 ---Level: Public
61 ---Purpose: Remove the ColorMapEntry at position index in the ColorMap
62 -- Warning: Raises BadAccess if the index is not defined in the
63 -- ColorMap.
64
65 FindColorMapIndex ( me ; AColorMapEntryIndex : Integer from Standard )
66 returns Integer from Standard
67 raises BadAccess from Aspect ;
68 ---Level: Public
69 ---Purpose: Returns the index in the ColorMap of the
70 -- ColorMapEntry.Index() equal to <AnEntryIndex>.
71 -- Warning: Raises BadAccess if the index is not defined in the
72 -- ColorMap.
73
74 FindEntry ( me ; AColorMapEntryIndex : Integer from Standard )
75 returns ColorMapEntry from Aspect
76 raises BadAccess from Aspect ;
77 ---Level: Public
78 ---Purpose: Returns the ColorMapEntry with ColorMapEntry.Index()
79 -- equal to <AnEntryIndex>.
80 -- Warning: Raises BadAccess if the index is not defined in the
81 -- ColorMap.
82 ---C++: return const &
83
84 NearestColorMapIndex( me ; aColor : Color from Quantity )
85 returns Integer from Standard ;
86 ---Level: Public
87 ---Purpose: Returns the index in the ColorMap of the
88 -- nearest matching ColorMapEntry
89
90 NearestEntry( me ; aColor : Color from Quantity )
91 returns ColorMapEntry from Aspect ;
92 ---Level: Public
93 ---Purpose: Returns the nearest ColorMapEntry that match aColor .
94 ---C++: return const &
95
96fields
97
98 myDataMap : DataMapOfIntegerInteger from TColStd is protected;
99
100end GenericColorMap;