source: trunk/src/STSubTable.h@ 809

Last change on this file since 809 was 808, checked in by mar637, 19 years ago

subtable base class for Scantable. Initial revision.

File size: 1.2 KB
Line 
1//
2// C++ Interface: STSubTable
3//
4// Description:
5//
6//
7// Author: Malte Marquarding <asap@atnf.csiro.au>, (C) 2006
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef ASAPSTSUBTABLE_H
13#define ASAPSTSUBTABLE_H
14
15#include <tables/Tables/Table.h>
16#include <tables/Tables/ScalarColumn.h>
17
18#include "SDLog.h"
19
20namespace asap {
21
22/**
23Abstract base class for all subtables in the Scantable class.
24
25@author Malte Marquarding
26@date $Date:$
27@version $Revision:$
28*/
29class STSubTable : public SDLog {
30public:
31 STSubTable( const casa::String& name,
32 casa::Table::TableType tt = casa::Table::Memory );
33
34 virtual ~STSubTable();
35
36
37 /**
38 * Add extra columns. To be implemented in derived class
39 */
40 virtual void setup() = 0;
41 // -> virtual bool conformant(const STSubTable& other) = 0;
42
43 /**
44 * Recalculate IDs to be 0-based and incremented by 1 i.e.
45 * rowno == ID
46 * @return the 'old' IDs
47 */
48 casa::Vector<casa::uInt> repopulate();
49
50 const casa::Table& table() const { return table_; }
51 casa::Table table() { return table_; }
52
53 casa::Table::TableType tableType() const { return type_; }
54
55protected:
56 casa::Table table_;
57 casa::ScalarColumn<casa::uInt> idCol_;
58
59private:
60 casa::Table::TableType type_;
61
62};
63
64}
65
66#endif
Note: See TracBrowser for help on using the repository browser.