casacore
Loading...
Searching...
No Matches
TaQLNodeResult.h
Go to the documentation of this file.
1// # TaQLNodeResult.h: Classes holding the result of a node tree visit
2// # Copyright (C) 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_TAQLNODERESULT_H
27#define TABLES_TAQLNODERESULT_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <memory>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// Abstract base class to hold the result of a visit to the node tree.
37// </summary>
38
39// <use visibility=local>
40
41// <reviewed reviewer="" date="" tests="tTableGram">
42// </reviewed>
43
44// <prerequisite>
45// # Classes you should understand before using this one.
46// <li> <linkto class=TaQLNodeVisitor>TaQLNodeVisitor</linkto>
47// <li> Note 199 describing
48// <a href="../notes/199.html">
49// TaQL</a>
50// </prerequisite>
51
52// <synopsis>
53// TaQLNodeResultRep is the abstract base class for classes holding
54// values filled by visitors to the raw TaQL parse tree. Visitors are
55// classes derived from <linkto class=TaQLNodeVisitor>TaQLNodeVisitor</linkto>
56// which traverse the parse tree.
57// TaQLNodeResultRep is the counted referenced letter class in the envelope
58// class <linkto class=TaQLNodeResult>TaQLNodeResult</linkto>.
59// </synopsis>
60
62 public:
63 // Default constructor.
65
66 // Destructor.
67 virtual ~TaQLNodeResultRep() = default;
68
69 // Letter objects cannot be copied.
70 // <group>
73 // </group>
74};
75
76// <summary>
77// Envelope class to hold the result of a visit to the node tree.
78// </summary>
79
80// <use visibility=local>
81
82// <reviewed reviewer="" date="" tests="tTableGram">
83// </reviewed>
84
85// <prerequisite>
86// # Classes you should understand before using this one.
87// <li> <linkto class=TaQLNodeVisitor>TaQLNodeVisitor</linkto>
88// <li> Note 199 describing
89// <a href="../notes/199.html">
90// TaQL</a>
91// </prerequisite>
92
93// <synopsis>
94// TaQLNodeResult is the envelope class for classes holding
95// values filled by visitors to the raw TaQL parse tree. Visitors are
96// classes derived from <linkto class=TaQLNodeVisitor>TaQLNodeVisitor</linkto>
97// which traverse the parse tree.
98// The counted referenced letter base class for the envelope is
99// class <linkto class=TaQLNodeResultRep>TaQLNodeResultRep</linkto>.
100// </synopsis>
102 public:
103 // Default constructor has no letter.
105
106 // Wrap the given pointer in a shared_ptr.
108
109 // Does the envelope hold a letter?
110 Bool isValid() const { return itsRep.get(); }
111
112 // Get the actual underlying object.
113 const TaQLNodeResultRep& getRep() const { return *(itsRep.get()); }
114
115 private:
116 std::shared_ptr<TaQLNodeResultRep> itsRep;
117};
118
119} // namespace casacore
120
121#endif
TaQLNodeResultRep(const TaQLNodeResultRep &)=delete
Letter objects cannot be copied.
virtual ~TaQLNodeResultRep()=default
Destructor.
TaQLNodeResultRep & operator=(const TaQLNodeResultRep &)=delete
TaQLNodeResultRep()
Default constructor.
const TaQLNodeResultRep & getRep() const
Get the actual underlying object.
std::shared_ptr< TaQLNodeResultRep > itsRep
TaQLNodeResult(TaQLNodeResultRep *rep)
Wrap the given pointer in a shared_ptr.
Bool isValid() const
Does the envelope hold a letter?
TaQLNodeResult()
Default constructor has no letter.
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40