casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
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.
76  TableRowProxy();
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 (uInt 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 (uInt 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
A 1-D Specialization of the Array class.
TableRowProxy & operator=(const TableRowProxy &)
Assignment (copy semantics).
Proxy for table row access.
Definition: TableRowProxy.h:72
Bool isWritable() const
Test if values can be written.
Bool isNull() const
Test if the underlying TableRow object is invalid.
Read/write access to a table row.
Definition: TableRow.h:390
High-level interface to tables.
Definition: TableProxy.h:103
void put(uInt rownr, const Record &values, Bool matchingFields)
Put values for the given row.
Readonly access to a table row.
Definition: TableRow.h:138
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
TableRowProxy()
Default constructor is only needed for the Block container.
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42