casacore
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
casacore::TableParseTableList Class Reference

Class containing two lists of TableParsePair objects. More...

#include <TableParseTableList.h>

Public Member Functions

Bool empty () const
 Is the FROM table list empty?
 
const std::vector< TableParsePair > & fromTables () const
 Get the FROM tables.
 
std::vector< TableParsePair > & fromTablesNC ()
 
TableExprInfo first () const
 Return the first FROM table (which is usually the table to operate on).
 
const TablefirstTable () const
 Return the first FROM table (which is usually the table to operate on).
 
Table addTable (Int tabnr, const String &name, const Table &ttab, const String &shorthand, Bool addToFromList, const std::vector< const Table * > &tempTables, const std::vector< TableParseQuery * > &stack, Int joinsIndex=-1)
 Add a table to the list of tables with the given shorthand name.
 
void replaceTable (const Table &table)
 Replace the first Table object in the FROM list with the given one.
 
TableParsePair findTable (const String &shorthand, Bool doWith) const
 Try to find the Table for the given shorthand in the table list.
 
TableRecordfindKeyword (const String &name, String &keyName, Bool update=True)
 Find the keyword given in the name parameter which is split into its shorthand, column and/or keyword parts.
 

Static Public Member Functions

static TableParsePair findTable (const String &shorthand, Bool doWith, const std::vector< TableParseQuery * > &stack)
 Find a table for the given shorthand.
 

Private Attributes

std::vector< TableParsePairitsFromTables
 
std::vector< TableParsePairitsWithTables
 

Detailed Description

Class containing two lists of TableParsePair objects.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

This class is used by TableParse to hold two lists of TableParsePair objects. One list is for the tables given in the WITH clause, the other list is for the other tables given in e.g. FROM or UPDATE. It has functions to operate on the lists, usually by means of the shorthand name.

Definition at line 129 of file TableParseTableList.h.

Member Function Documentation

◆ addTable()

Table casacore::TableParseTableList::addTable ( Int  tabnr,
const String name,
const Table ttab,
const String shorthand,
Bool  addToFromList,
const std::vector< const Table * > &  tempTables,
const std::vector< TableParseQuery * > &  stack,
Int  joinsIndex = -1 
)

Add a table to the list of tables with the given shorthand name.

The table can be given in a few ways:
- As a sequence number to be taken from tempTables.
- As a string giving the table name path.
- As a subtable name (starting with ::) which will be looked up in the stack of query objects.
- As a temporary table (from a nested query) given in ttab.
- As the shorthand name of another table which will be looked up in the stack of query objects.

◆ empty()

Bool casacore::TableParseTableList::empty ( ) const
inline

Is the FROM table list empty?

Definition at line 133 of file TableParseTableList.h.

References itsFromTables.

◆ findKeyword()

TableRecord & casacore::TableParseTableList::findKeyword ( const String name,
String keyName,
Bool  update = True 
)

Find the keyword given in the name parameter which is split into its shorthand, column and/or keyword parts.

It fills parameter keyName with the last keyword part and returns the TableRecord containing that keyword. It is a helper function for handleSetKey, etc. If update=True, rwKeywordSet() is used to ensure the table is updated. An exception is thrown in case a name is not found.

◆ findTable() [1/2]

TableParsePair casacore::TableParseTableList::findTable ( const String shorthand,
Bool  doWith 
) const

Try to find the Table for the given shorthand in the table list.

◆ findTable() [2/2]

static TableParsePair casacore::TableParseTableList::findTable ( const String shorthand,
Bool  doWith,
const std::vector< TableParseQuery * > &  stack 
)
static

Find a table for the given shorthand.

Optionally the WITH tables are searched as well. If no shorthand is given, the first FROM table is returned (if there). If not found, a TableParsePair with a null Table object is returned.

◆ first()

TableExprInfo casacore::TableParseTableList::first ( ) const
inline

Return the first FROM table (which is usually the table to operate on).

Definition at line 143 of file TableParseTableList.h.

References itsFromTables.

◆ firstTable()

const Table & casacore::TableParseTableList::firstTable ( ) const
inline

Return the first FROM table (which is usually the table to operate on).

Definition at line 147 of file TableParseTableList.h.

References itsFromTables.

◆ fromTables()

const std::vector< TableParsePair > & casacore::TableParseTableList::fromTables ( ) const
inline

Get the FROM tables.

Definition at line 137 of file TableParseTableList.h.

References itsFromTables.

◆ fromTablesNC()

std::vector< TableParsePair > & casacore::TableParseTableList::fromTablesNC ( )
inline

Definition at line 139 of file TableParseTableList.h.

References itsFromTables.

◆ replaceTable()

void casacore::TableParseTableList::replaceTable ( const Table table)

Replace the first Table object in the FROM list with the given one.

Member Data Documentation

◆ itsFromTables

std::vector<TableParsePair> casacore::TableParseTableList::itsFromTables
private

Definition at line 193 of file TableParseTableList.h.

Referenced by empty(), first(), firstTable(), fromTables(), and fromTablesNC().

◆ itsWithTables

std::vector<TableParsePair> casacore::TableParseTableList::itsWithTables
private

Definition at line 194 of file TableParseTableList.h.


The documentation for this class was generated from the following file: