This file is indexed.

/usr/include/casacore/measures/TableMeasures/TableMeasColumn.h is in casacore-dev 2.2.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
//# TableMeasColumn.h: Access to Measure Columns in Tables
//# Copyright (C) 1999,2000
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//#        Internet email: aips2-request@nrao.edu.
//#        Postal address: AIPS++ Project Office
//#                        National Radio Astronomy Observatory
//#                        520 Edgemont Road
//#                        Charlottesville, VA 22903-2475 USA
//#
//# $Id$

#ifndef MEASURES_TABLEMEASCOLUMN_H
#define MEASURES_TABLEMEASCOLUMN_H

//# Includes
#include <casacore/casa/aips.h>
#include <casacore/tables/Tables/TableColumn.h>
#include <casacore/casa/Utilities/CountedPtr.h>

namespace casacore { //# NAMESPACE CASACORE - BEGIN

//# Forward Declarations
class String;
class Table;
class TableMeasDescBase;


// <summary>
// Read only access to table scalar Measure columns.
// </summary>

// <use visibility=export>

// <reviewed reviewer="Bob Garwood" date="1999/12/23" tests="tTableMeasures.cc">
// </reviewed>

// <prerequisite>
//# Classes you should understand before using this one.
//   <li> <linkto module=Measures>Measures</linkto>
//   <li> <linkto module=Tables>Tables</linkto>
//   <li> <linkto class=TableMeasDesc>TableMeasDesc</linkto>
// </prerequisite>

// <synopsis>
// TableMeasColumn is the base class for the templated classes
// <linkto class=ScalarMeasColumn>ScalarMeasColumn</linkto> and
// <linkto class=ArrayMeasColumn>ArrayMeasColumn</linkto>
// which give access to table columns containing
// <linkto module=Measures>measures</linkto>.
//
// This base class offers some common functionality like getting
// the column name and testing if a row of the column contains a value.
// Its main function is <src>measDesc()</src>, which gives access
// to the <linkto class=TableMeasDescBase>TableMeasDescBase</linkto>
// object containing a description of the measure column.
// </synopsis>

// <example>
// <srcblock>
//     // Create the object for measure column Time1.
//     TableMeasColumn timeCol(tab, "Time1");
// 	
//     // print some details about the column
//     if (timeCol.measDesc().isRefCodeVariable()) {
//        cout << "The column has variable references." << endl;
//     } else {
//         cout << "The fixed MeasRef for the column is: "
//	        << timeCol.getMeasRef() << endl;
//     }
// </srcblock>
// </example>

// <motivation>
// This class contains the common functionality for the templated
// derived classes.
// </motivation>

//# <todo asof="$DATE:$">
//# </todo>


class TableMeasColumn
{
public:
  // The default constructor creates a null object.  Useful for creating
  // arrays of ScalarMeasColumn objects.  Attempting to use a null object
  // will produce a segmentation fault so care needs to be taken to
  // initialise the objects first by using attach().
  // An ScalarMeasColumn object can be tested if it is null by using the
  // isNull() member.
  TableMeasColumn();

  // Create the ScalarMeasColumn from the table and column Name.
  TableMeasColumn (const Table& tab, const String& columnName);

  // Copy constructor (copy semantics).
  TableMeasColumn (const TableMeasColumn& that);

  virtual ~TableMeasColumn();

  // Change the reference to another column.
  void reference (const TableMeasColumn& that);

  // Attach another column to the object.
  void attach (const Table& tab, const String& columnName);

  // Tests if a row contains a Measure (i.e., if the row has a defined
  // value).
  Bool isDefined (uInt rownr) const;

  // Get access to the TableMeasDescBase describing the column.
  // <group>
  const TableMeasDescBase& measDesc() const
    { return *itsDescPtr; }
  TableMeasDescBase& measDesc()
    { return *itsDescPtr; }
  // </group>

  // Test if the object is null.
  Bool isNull() const
    { return itsDescPtr.null(); }

  // Throw an exception if the object is null.
  void throwIfNull() const;

  // Get the name of the column.
  const String& columnName() const;

  // Get the Table object this column belongs to.
  Table table() const;

  // Is the column a scalar measures column?
  // It is if the underlying column is a scalar column or an array
  // column with a fixed 1-dimensional shape.
  // <br>Otherwise it is an array measures column.
  // <note role=caution>
  // It is not 100% determined if a measure column is an array or a scalar.
  // If the underlying table column is an array with a variable shape,
  // this function will see it as an array measure column. However,
  // it might be accessible as a scalar measure column.
  // </note>
  Bool isScalar() const;

protected:
  //# The measure's value is represented by this many data components.
  uInt itsNvals;
  //# The Measure Column description.
  CountedPtr<TableMeasDescBase> itsDescPtr;
  //# The data column.
  TableColumn itsTabDataCol;
  //# Does the measure column have a variable reference or offset?
  Bool itsVarRefFlag;
  Bool itsVarOffFlag;

private:
  // Assignment makes no sense in a readonly class.
  // Declaring this operator private makes it unusable.
  TableMeasColumn& operator= (const TableMeasColumn& that);
};

// For backwards compatibility:

#define ROTableMeasColumn TableMeasColumn

} //# NAMESPACE CASACORE - END

#endif