casacore
Loading...
Searching...
No Matches
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: 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_RECORDEXPR_H
27#define TABLES_RECORDEXPR_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/TaQL/ExprNode.h>
32#include <casacore/casa/Containers/RecordInterface.h>
33#include <casacore/casa/Containers/RecordDesc.h>
34
35namespace casacore { // # NAMESPACE CASACORE - BEGIN
36
37// <summary>
38// Global functions to make a expression node for a record field.
39// </summary>
40
41// <use visibility=export>
42
43// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
44// </reviewed>
45//
46// <prerequisite>
47// # Classes you should understand before using this one.
48// <li> TableExprNode
49// </prerequisite>
50
51// <synopsis>
52// This file contains a few global functions to construct an expression
53// node for a field in a record.
54// </synopsis>
55
56// <group name=RecordExpr>
58// Make a record expression node for the given field in the record description.
59// <group>
61TableExprNode makeRecordExpr(const RecordDesc& desc, const String& fieldName);
62// </group>
63
64// Make a record expression node for the given field in the record.
66 return makeRecordExpr(record.description(), fieldNumber);
67}
68
69// Make a record expression node for the given field in the record.
70// The field can be a field in the record itself, but it can also be
71// a field in a subrecord (or subsubrecord, etc.). If it is not a field
72// in the record itself, the name must define the 'path' to the field
73// in the subrecord by preceeding the field name with the name(s) of the
74// subrecord(s) separated by dots. E.g. <src>sub1.sub2.fld</src>
75TableExprNode makeRecordExpr(const RecordInterface& record, const String& fieldName);
76// </group>
77
78} // namespace casacore
79
80#endif
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
Int fieldNumber(const String &fieldName) const override
Get the field number from the field name.
RecordInterface()
The default constructor creates an empty record with a variable structure.
int Int
Definition aipstype.h:48
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:65