casacore
Loading...
Searching...
No Matches
TableRowProxy.h
Go to the documentation of this file.
1//# TableRowProxy.h: Proxy for table row access
2//# Copyright (C) 1994,1995,1996,1999,2005
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 TABLES_TABLEROWPROXY_H
27#define TABLES_TABLEROWPROXY_H
28
29
30//# Includes
31#include <casacore/casa/aips.h>
32#include <casacore/tables/Tables/TableRow.h>
33
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36//# Forward Declarations
37class TableProxy;
38class Record;
39
40
41// <summary>
42// Proxy for table row access.
43// </summary>
44
45// <use visibility=export>
46
47// <reviewed reviewer="Paul Shannon" date="1995/09/15" tests="tgtable.g" demos="">
48// </reviewed>
49
50// <prerequisite>
51//# Classes you should understand before using this one.
52// <li> class TableRow
53// </prerequisite>
54
55// <etymology>
56// TableRowProxy holds a TableRow object for the table
57// glish client.
58// </etymology>
59
60// <synopsis>
61// TableRowProxy gives access to row-based table accessor functions.
62// It is primarily meant to be used in classes that wrap access to it
63// from scripting languages (like Glish and Python).
64// However, it can also be used directly from other C++ code.
65//
66// A TableRowProxy object is usually created by class
67// <linkto class=TableProxy>TableProxy</linkto>.
68// </synopsis>
69
71{
72public:
73 // Default constructor is only needed for the Block container.
75
76 // Construct for the given columns in the table.
78 const Vector<String>& columnNames, Bool exclude);
79
80 // Copy constructor (copy semantics).
82
84
85 // Assignment (copy semantics).
87
88 // Test if the underlying TableRow object is invalid.
89 Bool isNull() const;
90
91 // Test if values can be written.
92 Bool isWritable() const;
93
94 // Get values for the given row.
95 Record get (Int64 rownr) const;
96
97 // Put values for the given row.
98 // The given record has to conform the fields in the table row.
99 void put (Int64 rownr, const Record& values, Bool matchingFields);
100
101private:
105};
106
107
109{
110 return isWritable_p;
111}
112
113
114} //# NAMESPACE CASACORE - END
115
116
117#endif
Record get(Int64 rownr) const
Get values for the given row.
TableRowProxy & operator=(const TableRowProxy &)
Assignment (copy semantics).
void put(Int64 rownr, const Record &values, Bool matchingFields)
Put values for the given row.
Bool isNull() const
Test if the underlying TableRow object is invalid.
TableRowProxy()
Default constructor is only needed for the Block container.
Bool isWritable() const
Test if values can be written.
TableRowProxy(const TableRowProxy &)
Copy constructor (copy semantics).
TableRowProxy(const TableProxy &table, const Vector< String > &columnNames, Bool exclude)
Construct for the given columns in the table.
Read/write access to a table row.
Definition TableRow.h:388
this file contains all the compiler specific defines
Definition mainpage.dox:28
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition aipsxtype.h:36
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40