casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColormapInfo.h
Go to the documentation of this file.
1 //# ColormapInfo.h: store information about the dynamic mapping of a Colormap
2 //# Copyright (C) 1994,1995,1996,1997,1998,1999
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #include <casa/aips.h>
29 
30 namespace casa { //# NAMESPACE CASA - BEGIN
31 
32  class Colormap;
33 
34 #ifndef TRIALDISPLAY_COLORMAPINFO_H
35 #define TRIALDISPLAY_COLORMAPINFO_H
36 
37 // <summary>
38 // ColormapInfo stores information about the dynamic mapping of a Colormap.
39 // </summary>
40 //
41 // <synopsis>
42 // </synopsis>
43 //
44 // <motivation>
45 // </motivation>
46 //
47 // <example>
48 // </example>
49 
50  class ColormapInfo {
51 
52  public:
53 
54  // (Required) default constructor.
55  ColormapInfo();
56 
57  // Constructor taking a pointer to a Colormap, and the initial
58  // weight, offset and size of the Colormap.
60  const casacore::uInt &offset, const casacore::uInt &size);
61 
62  // Yield a pointer to the Colormap about which this stores
63  // information.
64  const Colormap *colormap() const {
65  return itsColormap;
66  }
67 
68  // Return the current weight for this mapping.
70  return itsWeight;
71  }
72 
73  // Return the current offset for this mapping.
75  return itsOffset;
76  }
77 
78  // Return the current size for this mapping.
79  casacore::uInt size() const {
80  return itsSize;
81  }
82 
83  // Set the weight for this mapping.
84  void setWeight(const casacore::Float &weight);
85 
86  // Set the offset for this mapping.
87  void setOffset(const casacore::uInt &offset);
88 
89  // Set the size for this mapping.
90  void setSize(const casacore::uInt &size);
91 
92  // Increment and decrement the reference count for this mapping.
93  // <group>
94  void ref();
95  void unref();
96  // </group>
97 
98  // Return the current reference count.
100  return itsRefCount;
101  }
102 
103  private:
104 
105  // Store the Colormap of this mapping here.
107 
108  // Store the weight of the mapping here.
110 
111  // Store the offset of the mapping here.
113 
114  // Store the size of the mapping here.
116 
117  // Store the reference count of the mapping here.
119 
120  };
121 
122 
123 } //# NAMESPACE CASA - END
124 
125 #endif
int Int
Definition: aipstype.h:50
const Colormap * colormap() const
Yield a pointer to the Colormap about which this stores information.
Definition: ColormapInfo.h:64
casacore::Int itsRefCount
Store the reference count of the mapping here.
Definition: ColormapInfo.h:118
casacore::uInt refCount() const
Return the current reference count.
Definition: ColormapInfo.h:99
casacore::Float itsWeight
Store the weight of the mapping here.
Definition: ColormapInfo.h:109
void ref()
Increment and decrement the reference count for this mapping.
casacore::uInt size() const
Return the current size for this mapping.
Definition: ColormapInfo.h:79
ColormapInfo()
(Required) default constructor.
casacore::uInt itsSize
Store the size of the mapping here.
Definition: ColormapInfo.h:115
const Colormap * itsColormap
Store the Colormap of this mapping here.
Definition: ColormapInfo.h:106
void setWeight(const casacore::Float &weight)
Set the weight for this mapping.
float Float
Definition: aipstype.h:54
casacore::uInt offset() const
Return the current offset for this mapping.
Definition: ColormapInfo.h:74
void setSize(const casacore::uInt &size)
Set the size for this mapping.
Describes a method of generating a table of colors.
Definition: Colormap.h:104
void setOffset(const casacore::uInt &offset)
Set the offset for this mapping.
casacore::uInt itsOffset
Store the offset of the mapping here.
Definition: ColormapInfo.h:112
ColormapInfo stores information about the dynamic mapping of a Colormap.
Definition: ColormapInfo.h:50
casacore::Float weight() const
Return the current weight for this mapping.
Definition: ColormapInfo.h:69
unsigned int uInt
Definition: aipstype.h:51