Changeset 22


Ignore:
Timestamp:
07/06/04 11:12:48 (20 years ago)
Author:
mmarquar
Message:

Removed irrelevantr member function "name". Added function to return number of rows in table.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r21 r22  
    6565  beamSel_(0),
    6666  polSel_(0) {
    67   name_ = String(name);
    68   Table tab(name_);
    69   table_ = tab.copyToMemoryTable(name_);
     67  Table tab("dummy");
     68  table_ = tab.copyToMemoryTable("dummy");
    7069}
    7170
     
    7574  this->polSel_= other.polSel_;
    7675  this->chanMask_ = other.chanMask_;
    77   this->name_ = String("dummy");
    7876  this->table_ = other.table_.copyToMemoryTable(String("dummy"));
    7977  // clear all rows()
     
    9189  beamSel_(0),
    9290  polSel_(0) {
    93   name_ = String("SDMemTable");
    9491  String exprs = String("select * from $1 where SCANID == ")
    9592    +String::toString(scanID);
    9693  cerr << exprs << endl;
    9794  Table t = tableCommand(exprs,tab);
    98   table_ = t.copyToMemoryTable(name_);
     95  table_ = t.copyToMemoryTable("dummy");
    9996}
    10097
     
    119116  // Now create a new table from the description.
    120117
    121   SetupNewTable aNewTab(name_, td, Table::New);
     118  SetupNewTable aNewTab("dummy", td, Table::New);
    122119  table_ = Table(aNewTab, Table::Memory, 0); 
    123 }
    124 
    125 std::string SDMemTable::name() const {
    126   return name_;
    127120}
    128121
  • trunk/src/SDMemTable.h

    r21 r22  
    103103  virtual void summary() const;
    104104 
    105   // the (irrelevant) name
    106   std::string name() const;
    107 
    108105  // write to disk as aips++ table
    109106  void makePersistent(const std::string& filename);
     
    122119  Int nChan() const;
    123120
     121  // return the number of rows (integrations) in the table
     122  Int nRows() const { return table_.nrow(); }
     123
    124124  // return a row as a Masked array, internally converting uChar flags
    125125  // to bool mask
     
    128128
    129129private:
    130   // set up tabel structure
     130  // set up table structure
    131131  void setup();
    132132  // the current cursor into the array
Note: See TracChangeset for help on using the changeset viewer.