source: trunk/src/STSubTable.cpp@ 3145

Last change on this file since 3145 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

File size: 1.2 KB
Line 
1//
2// C++ Implementation: 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#include <casa/Exceptions/Error.h>
13#include <tables/Tables/TableDesc.h>
14#include <tables/Tables/SetupNewTab.h>
15#include <tables/Tables/ScaColDesc.h>
16#include <tables/Tables/TableRecord.h>
17
18#include "Scantable.h"
19#include "STSubTable.h"
20
21
22using namespace casacore;
23
24namespace asap {
25
26STSubTable::STSubTable( const Scantable& parent, const casacore::String& name )
27{
28 TableDesc td("", "1", TableDesc::Scratch);
29 td.addColumn(ScalarColumnDesc<uInt>("ID"));
30 String tabname = parent.table().tableName()+"/"+name;
31 SetupNewTable aNewTab(tabname, td, Table::Scratch);
32 table_ = Table(aNewTab, parent.table().tableType());
33 idCol_.attach(table_,"ID");
34
35}
36STSubTable::STSubTable(Table tab, const String& name)
37{
38 table_ = tab.rwKeywordSet().asTable(name);
39 idCol_.attach(table_,"ID");
40}
41
42
43STSubTable::~STSubTable()
44{
45}
46
47STSubTable& asap::STSubTable::operator=( const STSubTable& other)
48{
49 if (&other != this) {
50 this->table_ = other.table_;
51 idCol_.attach(this->table_,"ID");
52 }
53 return *this;
54}
55
56
57}
Note: See TracBrowser for help on using the repository browser.