Changeset 857


Ignore:
Timestamp:
03/01/06 11:48:43 (19 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

Location:
trunk/src
Files:
2 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}
  • trunk/src/STSubTable.h

    r849 r857  
    3131public:
    3232  STSubTable() {;}
    33   STSubTable( casa::Table tab );
    34   STSubTable( const Scantable& parent,
    35               const casa::String& name );
     33  STSubTable( casa::Table tab, const casa::String& name);
     34  STSubTable( const Scantable& parent, const casa::String& name );
    3635
    3736  virtual ~STSubTable();
     
    4645  virtual void setup() = 0;
    4746  // -> virtual bool conformant(const STSubTable& other) = 0;
     47
     48  virtual const casa::String& name() const = 0;
    4849
    4950  /**
     
    6263
    6364private:
     65
    6466};
    6567
Note: See TracChangeset for help on using the changeset viewer.