casacore
Loading...
Searching...
No Matches
LELScalar.h
Go to the documentation of this file.
1//# LELScalar.h: Hold a scalar with a mask in LEL
2//# Copyright (C) 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#ifndef LATTICES_LELSCALAR_H
29#define LATTICES_LELSCALAR_H
30
31
32//# Includes
33#include <casacore/casa/aips.h>
34
35
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38// <summary>
39// This LEL class holds a scalar with a mask.
40// </summary>
41
42// <use visibility=local>
43
44// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
45// </reviewed>
46
47// <synopsis>
48// This LEL class holds a scalar with a mask.
49// </synopsis>
50
51// <motivation>
52// It maskes it possible to handle a scalar with its mask as a single object.
53// </motivation>
54
55// <todo asof="1998/01/20">
56// </todo>
57
58
59template <class T> class LELScalar
60{
61public:
62// Default constructor sets a False mask.
64
65// Constructor takes value and optional mask.
68
69// Get value.
70// <group>
71 const T& value() const
72 { return itsValue; }
73 T& value()
74 { return itsValue; }
75// </group>
76
77// Get mask.
78 Bool mask() const
79 { return itsMask; }
80
81private:
84};
85
86
87
88} //# NAMESPACE CASACORE - END
89
90#ifndef CASACORE_NO_AUTO_TEMPLATES
91#include <casacore/lattices/LEL/LELScalar.tcc>
92#endif //# CASACORE_NO_AUTO_TEMPLATES
93#endif
LELScalar(const T &value, Bool mask=True)
Constructor takes value and optional mask.
Definition LELScalar.h:66
const T & value() const
Get value.
Definition LELScalar.h:71
LELScalar()
Default constructor sets a False mask.
Bool mask() const
Get mask.
Definition LELScalar.h:78
this file contains all the compiler specific defines
Definition mainpage.dox:28
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:42
const Bool True
Definition aipstype.h:43