ColormapInfo.h

Go to the documentation of this file.
00001 //# ColormapInfo.h: store information about the dynamic mapping of a Colormap
00002 //# Copyright (C) 1994,1995,1996,1997,1998,1999
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #include <casa/aips.h>
00029 
00030 namespace casa { //# NAMESPACE CASA - BEGIN
00031 
00032         class Colormap;
00033 
00034 #ifndef TRIALDISPLAY_COLORMAPINFO_H
00035 #define TRIALDISPLAY_COLORMAPINFO_H
00036 
00037 // <summary>
00038 // ColormapInfo stores information about the dynamic mapping of a Colormap.
00039 // </summary>
00040 //
00041 // <synopsis>
00042 // </synopsis>
00043 //
00044 // <motivation>
00045 // </motivation>
00046 //
00047 // <example>
00048 // </example>
00049 
00050         class ColormapInfo {
00051 
00052         public:
00053 
00054                 // (Required) default constructor.
00055                 ColormapInfo();
00056 
00057                 // Constructor taking a pointer to a Colormap, and the initial
00058                 // weight, offset and size of the Colormap.
00059                 ColormapInfo(const Colormap *colormap, const Float &weight,
00060                              const uInt &offset, const uInt &size);
00061 
00062                 // Yield a pointer to the Colormap about which this stores
00063                 // information.
00064                 const Colormap *colormap() const {
00065                         return itsColormap;
00066                 }
00067 
00068                 // Return the current weight for this mapping.
00069                 Float weight() const {
00070                         return itsWeight;
00071                 }
00072 
00073                 // Return the current offset for this mapping.
00074                 uInt offset() const {
00075                         return itsOffset;
00076                 }
00077 
00078                 // Return the current size for this mapping.
00079                 uInt size() const {
00080                         return itsSize;
00081                 }
00082 
00083                 // Set the weight for this mapping.
00084                 void setWeight(const Float &weight);
00085 
00086                 // Set the offset for this mapping.
00087                 void setOffset(const uInt &offset);
00088 
00089                 // Set the size for this mapping.
00090                 void setSize(const uInt &size);
00091 
00092                 // Increment and decrement the reference count for this mapping.
00093                 // <group>
00094                 void ref();
00095                 void unref();
00096                 // </group>
00097 
00098                 // Return the current reference count.
00099                 uInt refCount() const {
00100                         return itsRefCount;
00101                 }
00102 
00103         private:
00104 
00105                 // Store the Colormap of this mapping here.
00106                 const Colormap *itsColormap;
00107 
00108                 // Store the weight of the mapping here.
00109                 Float itsWeight;
00110 
00111                 // Store the offset of the mapping here.
00112                 uInt itsOffset;
00113 
00114                 // Store the size of the mapping here.
00115                 uInt itsSize;
00116 
00117                 // Store the reference count of the mapping here.
00118                 Int itsRefCount;
00119 
00120         };
00121 
00122 
00123 } //# NAMESPACE CASA - END
00124 
00125 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1