Changeset 849 for trunk/src/STSubTable.cpp
- Timestamp:
- 02/28/06 10:47:19 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STSubTable.cpp
r808 r849 15 15 #include <tables/Tables/ScaColDesc.h> 16 16 17 #include "Scantable.h" 17 18 #include "STSubTable.h" 19 18 20 19 21 using namespace casa; … … 21 23 namespace asap { 22 24 23 STSubTable::STSubTable(const casa::String& name, casa::Table::TableType tt) : 24 type_(tt) 25 25 STSubTable::STSubTable( const Scantable& parent, const casa::String& name ) 26 26 { 27 27 TableDesc td("", "1", TableDesc::Scratch); 28 28 td.addColumn(ScalarColumnDesc<uInt>("ID")); 29 SetupNewTable aNewTab(name, td, Table::New); 30 table_ = Table(aNewTab, tableType()); 29 String tabname = parent.table().tableName()+"/"+name; 30 SetupNewTable aNewTab(tabname, td, Table::New); 31 table_ = Table(aNewTab, parent.table().tableType()); 31 32 idCol_.attach(table_,"ID"); 32 33 33 34 } 35 STSubTable::STSubTable(Table tab) 36 { 37 table_ = tab; 38 idCol_.attach(table_,"ID"); 39 } 40 34 41 35 42 STSubTable::~STSubTable() … … 37 44 } 38 45 46 STSubTable& asap::STSubTable::operator=( const STSubTable& other) 47 { 48 if (&other != this) { 49 this->table_ = other.table_; 50 idCol_.attach(this->table_,"ID"); 51 } 52 return *this; 39 53 } 54 55 56 }
Note: See TracChangeset
for help on using the changeset viewer.