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