Changeset 138 for trunk/src


Ignore:
Timestamp:
12/24/04 13:20:38 (20 years ago)
Author:
mar637
Message:

Added assignment operator.
Changed const casa::Table& table() to be const
added SDMemTable* getPtr()

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r125 r138  
    108108  cond += String::toString(scanID);
    109109  return SDMemTable(table_, cond);
     110}
     111
     112SDMemTable &SDMemTable::operator=(const SDMemTable& other) {
     113  // reset "cursor"
     114  IFSel_ = 0;
     115  beamSel_ = 0;
     116  polSel_ = 0;
     117  table_ = other.table().copyToMemoryTable("dummy");
     118  return *this;
    110119}
    111120
  • trunk/src/SDMemTable.h

    r125 r138  
    6464  // see also getScan()
    6565  SDMemTable(const casa::Table& tab, const std::string& expr);
    66 
     66 
     67  SDMemTable &operator=(const SDMemTable& other);
     68 
    6769  virtual ~SDMemTable();
    6870
     
    128130  const casa::TableRecord& getHeader() const {return table_.keywordSet();}
    129131  // get a handle to the "raw" aips++ table
    130   const casa::Table& table() { return table_; }
     132  const casa::Table& table() const { return table_; }
    131133
    132134  // return the number of values
  • trunk/src/SDMemTableWrapper.h

    r125 r138  
    138138
    139139  casa::CountedPtr<SDMemTable> getCP() const {return table_;}
     140  SDMemTable* getPtr() {return &(*table_);}
    140141  std::string summary() { return table_->summary(); }
    141142
Note: See TracChangeset for help on using the changeset viewer.