d933862cd7b08e28101b0d7ee28c5ba451b89b49
[occt.git] / src / Aspect / Aspect_ColorMapEntry.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
23 class ColorMapEntry from Aspect inherits Storable from Standard
24
25         ---Version: 0.0
26
27         ---Purpose: This class defines a colormap entry.
28         --          A colormap entry is an association between
29         --          a RGB object and a index in the colormap.
30         ---Keywords:
31         ---Warning:
32         ---References:
33
34 uses
35         Color from Quantity
36
37 raises
38         OutOfRange      from Standard,
39         BadAccess       from Aspect
40
41 is
42         Create
43         returns ColorMapEntry from Aspect;
44         ---Level: Public
45         ---Purpose: Creates an unallocated colormap entry
46         
47         Create ( index : in Integer from Standard;
48                  rgb : in Color from Quantity)
49         returns ColorMapEntry;
50         ---Level: Public
51         ---Purpose: Creates an allocated colormap entry
52
53         Create ( entry : in ColorMapEntry from Aspect )
54         returns ColorMapEntry
55         ---Level: Public
56         ---Purpose: Creates an allocated colormap entry.
57         --  Warning: Raises error if the colormap entry <entry>
58         --          is unallocated.
59         raises BadAccess from Aspect;
60
61         SetValue ( me: in out; index : in Integer from Standard;
62                         rgb : in Color from Quantity );
63         ---Level: Public
64         ---Purpose: Sets colormap entry value and allocates it.
65  
66         SetValue ( me: in out; entry : in ColorMapEntry from Aspect);
67         ---Level: Public
68         ---Purpose: Sets colormap entry value and allocates it.
69         ---C++: alias operator =
70  
71         SetColor ( me: in out; rgb : in Color from Quantity );
72         ---Level: Public
73         ---Purpose: Sets color <rgb> of colormap entry.
74
75         Color ( me : in ) returns Color from Quantity
76         ---Warning: Raises error if the colormap entry is unallocated .
77         raises BadAccess from Aspect;
78         ---C++: return const & 
79
80         SetIndex ( me: in out; index : in Integer from Standard);
81         ---Level: Public
82         ---Purpose: Sets index value of a colormap entry.
83
84         Index ( me : in ) returns Integer from Standard 
85         ---Warning: Raises error if the colormap entry is unallocated .
86         raises BadAccess from Aspect;
87
88         Free ( me : in out );
89         ---Level: Public
90         ---Purpose: Unallocates the colormap entry.
91
92         IsAllocated ( me : in )
93         returns Boolean from Standard;
94         ---Level: Public
95         ---Purpose: Returns True if the colormap entry is allocated.
96         --  Warning: A colormap entry is allocated when the color and
97         --          the index is defined.
98
99         Dump( me : in ) ;
100         ---Level: Internal
101
102 fields
103         allocated       : Boolean from Standard;
104         mycolor         : Color from Quantity;
105         myindex         : Integer from Standard;
106         myColorIsDef    : Boolean from Standard;
107         myIndexIsDef    : Boolean from Standard;
108
109 end ColorMapEntry from Aspect;