source: trunk/src/STSubTable.h@ 851

Last change on this file since 851 was 849, checked in by mar637, 19 years ago

added assignment operator and additional constructor

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
22class Scantable;
23/**
24Abstract base class for all subtables in the Scantable class.
25
26@author Malte Marquarding
27@date $Date:$
28@version $Revision:$
29*/
30class STSubTable : public SDLog {
31public:
32 STSubTable() {;}
33 STSubTable( casa::Table tab );
34 STSubTable( const Scantable& parent,
35 const casa::String& name );
36
37 virtual ~STSubTable();
38
39 STSubTable& operator=(const STSubTable& other);
40
41
42
43 /**
44 * Add extra columns. To be implemented in derived class
45 */
46 virtual void setup() = 0;
47 // -> virtual bool conformant(const STSubTable& other) = 0;
48
49 /**
50 * Recalculate IDs to be 0-based and incremented by 1 i.e.
51 * rowno == ID
52 * @return the 'old' IDs
53 */
54 casa::Vector<casa::uInt> repopulate();
55
56 const casa::Table& table() const { return table_; }
57 casa::Table table() { return table_; }
58
59protected:
60 casa::Table table_;
61 casa::ScalarColumn<casa::uInt> idCol_;
62
63private:
64};
65
66}
67
68#endif
Note: See TracBrowser for help on using the repository browser.