source: trunk/src/STSubTable.cpp@ 3149

Last change on this file since 3149 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
RevLine 
[808]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>
[857]16#include <tables/Tables/TableRecord.h>
[808]17
[849]18#include "Scantable.h"
[808]19#include "STSubTable.h"
20
[849]21
[3106]22using namespace casacore;
[808]23
24namespace asap {
25
[3106]26STSubTable::STSubTable( const Scantable& parent, const casacore::String& name )
[808]27{
28 TableDesc td("", "1", TableDesc::Scratch);
29 td.addColumn(ScalarColumnDesc<uInt>("ID"));
[849]30 String tabname = parent.table().tableName()+"/"+name;
[857]31 SetupNewTable aNewTab(tabname, td, Table::Scratch);
[849]32 table_ = Table(aNewTab, parent.table().tableType());
[808]33 idCol_.attach(table_,"ID");
34
35}
[857]36STSubTable::STSubTable(Table tab, const String& name)
[849]37{
[857]38 table_ = tab.rwKeywordSet().asTable(name);
[849]39 idCol_.attach(table_,"ID");
40}
[808]41
[849]42
[808]43STSubTable::~STSubTable()
44{
45}
46
[849]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;
[808]54}
[849]55
56
57}
Note: See TracBrowser for help on using the repository browser.