casacore::TaQLNodeRep Class Reference

Representation of a node in the raw TaQL parse tree. More...

#include <TaQLNodeRep.h>

Inheritance diagram for casacore::TaQLNodeRep:
casacore::TaQLAddColNodeRep casacore::TaQLAddRowNodeRep casacore::TaQLBinaryNodeRep casacore::TaQLCalcNodeRep casacore::TaQLColNodeRep casacore::TaQLColSpecNodeRep casacore::TaQLColumnsNodeRep casacore::TaQLConstNodeRep casacore::TaQLDeleteNodeRep casacore::TaQLFuncNodeRep casacore::TaQLGivingNodeRep casacore::TaQLGroupNodeRep casacore::TaQLIndexNodeRep casacore::TaQLInsertNodeRep casacore::TaQLJoinNodeRep casacore::TaQLKeyColNodeRep casacore::TaQLLimitOffNodeRep casacore::TaQLMultiNodeRep casacore::TaQLQueryNodeRep casacore::TaQLRangeNodeRep casacore::TaQLRecFldNodeRep casacore::TaQLRegexNodeRep casacore::TaQLRenDropNodeRep casacore::TaQLSetKeyNodeRep casacore::TaQLShowNodeRep casacore::TaQLSortKeyNodeRep casacore::TaQLSortNodeRep casacore::TaQLTableNodeRep casacore::TaQLUnaryNodeRep casacore::TaQLUnitNodeRep casacore::TaQLUpdateNodeRep casacore::TaQLUpdExprNodeRep

List of all members.

Public Member Functions

 TaQLNodeRep (int nodeType)
 Constructor for derived classes specifying the type.
virtual ~TaQLNodeRep ()
char nodeType () const
 Get the node type of the derived class.
const TaQLStylestyle () const
 Get the TaQL style.
virtual TaQLNodeResult visit (TaQLNodeVisitor &) const =0
 Visit a node for tree traversal.
virtual void show (std::ostream &os) const =0
 Print the object in an ostream.
virtual void save (AipsIO &aio) const =0
 Save the object.

Static Public Member Functions

static TaQLNodeReplink (TaQLNodeRep *rep)
 Increment the reference count.
static void unlink (TaQLNodeRep *rep)
 Decrement the reference count.
static String checkDataType (const String &)
 Check the data type string and return its standard form.

Private Member Functions

 TaQLNodeRep (const TaQLNodeRep &)
 Letter objects cannot be copied.
TaQLNodeRepoperator= (const TaQLNodeRep &)

Private Attributes

int itsCount
char itsNodeType
TaQLStyle itsStyle

Detailed Description

Representation of a node in the raw TaQL parse tree.

Intended use:

Internal

Review Status

Test programs:
tTaQLNode

Prerequisite

Synopsis

TaQLNode/TaQLNodeRep form an envelope/letter pair. TaQLNodeRep is the abstract base class for all classes used in the raw TaQL parse tree (e.g. TaQLConstNodeRep ).

Motivation

The envelope/letter idiom (aka counted referencing) is a nice means to pass an object around by value, so to ensure that an object is deleted in case of an exception. Furthermore it makes copying an object very cheap and memory management straightforward.

Definition at line 76 of file TaQLNodeRep.h.


Constructor & Destructor Documentation

casacore::TaQLNodeRep::TaQLNodeRep ( int  nodeType  )  [explicit]

Constructor for derived classes specifying the type.

virtual casacore::TaQLNodeRep::~TaQLNodeRep (  )  [virtual]
casacore::TaQLNodeRep::TaQLNodeRep ( const TaQLNodeRep  )  [private]

Letter objects cannot be copied.


Member Function Documentation

static String casacore::TaQLNodeRep::checkDataType ( const String  )  [static]

Check the data type string and return its standard form.

static TaQLNodeRep* casacore::TaQLNodeRep::link ( TaQLNodeRep rep  )  [inline, static]

Increment the reference count.

Definition at line 128 of file TaQLNodeRep.h.

References itsCount.

Referenced by casacore::TaQLNode::operator=(), and casacore::TaQLNode::TaQLNode().

char casacore::TaQLNodeRep::nodeType (  )  const [inline]

Get the node type of the derived class.

Definition at line 142 of file TaQLNodeRep.h.

References itsNodeType.

Referenced by casacore::TaQLNode::nodeType().

TaQLNodeRep& casacore::TaQLNodeRep::operator= ( const TaQLNodeRep  )  [private]
virtual void casacore::TaQLNodeRep::save ( AipsIO aio  )  const [pure virtual]
virtual void casacore::TaQLNodeRep::show ( std::ostream &  os  )  const [pure virtual]
const TaQLStyle& casacore::TaQLNodeRep::style (  )  const [inline]

Get the TaQL style.

Definition at line 146 of file TaQLNodeRep.h.

References itsStyle.

Referenced by casacore::TaQLNode::style().

static void casacore::TaQLNodeRep::unlink ( TaQLNodeRep rep  )  [inline, static]

Decrement the reference count.

Delete the letter if no more references.

Definition at line 136 of file TaQLNodeRep.h.

References itsCount.

Referenced by casacore::TaQLNode::operator=(), and casacore::TaQLNode::~TaQLNode().

virtual TaQLNodeResult casacore::TaQLNodeRep::visit ( TaQLNodeVisitor  )  const [pure virtual]

Member Data Documentation

Definition at line 168 of file TaQLNodeRep.h.

Referenced by link(), and unlink().

Definition at line 169 of file TaQLNodeRep.h.

Referenced by nodeType().

Definition at line 170 of file TaQLNodeRep.h.

Referenced by style().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1