casacore
RecordExpr.h
Go to the documentation of this file.
1 //# RecordExpr.h: Global functions to make a expression node for a record field
2 //# Copyright (C) 2000
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_RECORDEXPR_H
29 #define TABLES_RECORDEXPR_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/TaQL/ExprNode.h>
34 #include <casacore/casa/Containers/RecordInterface.h>
35 #include <casacore/casa/Containers/RecordDesc.h>
36 
37 
38 
39 namespace casacore { //# NAMESPACE CASACORE - BEGIN
40 
41 // <summary>
42 // Global functions to make a expression node for a record field.
43 // </summary>
44 
45 // <use visibility=export>
46 
47 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
48 // </reviewed>
49 //
50 // <prerequisite>
51 //# Classes you should understand before using this one.
52 // <li> TableExprNode
53 // </prerequisite>
54 
55 // <synopsis>
56 // This file contains a few global functions to construct an expression
57 // node for a field in a record.
58 // </synopsis>
59 
60 
61 // <group name=RecordExpr>
62 
63 // Make a record expression node for the given field in the record description.
64 // <group>
66  Int fieldNumber);
68  const String& fieldName);
69 // </group>
70 
71 // Make a record expression node for the given field in the record.
73  Int fieldNumber)
74  { return makeRecordExpr (record.description(), fieldNumber); }
75 
76 
77 // Make a record expression node for the given field in the record.
78 // The field can be a field in the record itself, but it can also be
79 // a field in a subrecord (or subsubrecord, etc.). If it is not a field
80 // in the record itself, the name must define the 'path' to the field
81 // in the subrecord by preceeding the field name with the name(s) of the
82 // subrecord(s) separated by dots. E.g. <src>sub1.sub2.fld</src>
84  const String& fieldName);
85 // </group>
86 
87 
88 
89 
90 } //# NAMESPACE CASACORE - END
91 
92 #endif
RecordDesc description() const
Get the description of this record.
String: the storage and methods of handling collections of characters.
Definition: String.h:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
int Int
Definition: aipstype.h:50
TableExprNode makeRecordExpr(const RecordInterface &record, const String &fieldName)
Make a record expression node for the given field in the record.
TableExprNode makeRecordExpr(const RecordDesc &desc, const String &fieldName)
TableExprNode makeRecordExpr(const RecordDesc &desc, Int fieldNumber)
Make a record expression node for the given field in the record description.
TableExprNode makeRecordExpr(const RecordInterface &record, Int fieldNumber)
Make a record expression node for the given field in the record.
Definition: RecordExpr.h:72