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