Ignore:
Timestamp:
03/01/06 11:48:43 (18 years ago)
Author:
mar637
Message:

added name()
reworked copy constructor for (Table tab) to tale name of the derived class
fixed bug in constructor, where Table::New was used instead of Table::Scratch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSubTable.cpp

    r849 r857  
    1414#include <tables/Tables/SetupNewTab.h>
    1515#include <tables/Tables/ScaColDesc.h>
     16#include <tables/Tables/TableRecord.h>
    1617
    1718#include "Scantable.h"
     
    2829  td.addColumn(ScalarColumnDesc<uInt>("ID"));
    2930  String tabname = parent.table().tableName()+"/"+name;
    30   SetupNewTable aNewTab(tabname, td, Table::New);
     31  SetupNewTable aNewTab(tabname, td, Table::Scratch);
    3132  table_ = Table(aNewTab, parent.table().tableType());
    3233  idCol_.attach(table_,"ID");
    3334
    3435}
    35 STSubTable::STSubTable(Table tab)
     36STSubTable::STSubTable(Table tab, const String& name)
    3637{
    37   table_ = tab;
     38  table_ = tab.rwKeywordSet().asTable(name);
    3839  idCol_.attach(table_,"ID");
    3940}
Note: See TracChangeset for help on using the changeset viewer.