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