Changeset 164


Ignore:
Timestamp:
12/27/04 20:10:59 (19 years ago)
Author:
kil064
Message:

make a few more functions 'const'

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r158 r164  
    104104}
    105105
    106 SDMemTable SDMemTable::getScan(Int scanID) {
     106SDMemTable SDMemTable::getScan(Int scanID) const {
    107107  String cond("SELECT * from $1 WHERE SCANID == ");
    108108  cond += String::toString(scanID);
     
    122122}
    123123
    124 SDMemTable SDMemTable::getSource(const std::string& source) {
     124SDMemTable SDMemTable::getSource(const std::string& source) const {
    125125  String cond("SELECT * from $1 WHERE SRCNAME == ");
    126126  cond += source;
     
    321321}
    322322
    323 std::vector<double> SDMemTable::getAbcissa(Int whichRow) {
     323std::vector<double> SDMemTable::getAbcissa(Int whichRow) const {
    324324  std::vector<double> absc(nChan());
    325325  Vector<Double> absc1(nChan());
     
    416416}
    417417
    418 std::string SDMemTable::getAbcissaString(Int whichRow)
     418std::string SDMemTable::getAbcissaString(Int whichRow) const
    419419{
    420420  ROArrayColumn<uInt> fid(table_, "FREQID");
     
    471471}
    472472
    473 void SDMemTable::getSpectrum(Vector<Float>& spectrum, Int whichRow) {
     473void SDMemTable::getSpectrum(Vector<Float>& spectrum, Int whichRow) const {
    474474  ROArrayColumn<Float> spec(table_, "SPECTRA");
    475475  Array<Float> arr;
     
    524524*/
    525525MaskedArray<Float> SDMemTable::rowAsMaskedArray(uInt whichRow,
    526                                                 Bool useSelection) {
     526                                                Bool useSelection) const
     527{
    527528  ROArrayColumn<Float> spec(table_, "SPECTRA");
    528529  Array<Float> arr;
     
    832833};
    833834
    834 std::string SDMemTable::summary()  {
     835std::string SDMemTable::summary()   {
    835836  ROScalarColumn<Int> scans(table_, "SCANID");
    836837  ROScalarColumn<String> srcs(table_, "SRCNAME");
  • trunk/src/SDMemTable.h

    r161 r164  
    8787  // get all as aips++ Vectors
    8888  virtual void getSpectrum(casa::Vector<casa::Float>& spectrum,
    89                            casa::Int whichRow=0);
     89                           casa::Int whichRow=0) const;
    9090
    9191  //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const;
     
    126126
    127127  // get a new SDMemTable containing all rows with the same give SCANID
    128   SDMemTable getScan(casa::Int scanID);
    129   SDMemTable getSource(const std::string& source);
     128  SDMemTable getScan(casa::Int scanID) const;
     129  SDMemTable getSource(const std::string& source) const;
    130130
    131131  const casa::TableRecord& getHeader() const {return table_.keywordSet();}
     
    145145  // to bool mask
    146146  casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow,
    147                                                   casa::Bool useSelection = casa::False);
     147                                                  casa::Bool useSelection = casa::False) const;
    148148
    149149  casa::SpectralCoordinate getCoordinate(casa::uInt whichIdx) const;
     
    153153  casa::Int nCoordinates() const;
    154154
    155   std::vector<double> getAbcissa(int whichRow=0);
    156   std::string getAbcissaString(casa::Int whichRow=0);
     155  std::vector<double> getAbcissa(int whichRow=0) const;
     156  std::string getAbcissaString(casa::Int whichRow=0) const;
    157157
    158158private:
Note: See TracChangeset for help on using the changeset viewer.