Changeset 2911 for trunk/src/STIdxIter.h


Ignore:
Timestamp:
04/01/14 13:05:18 (10 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdcal

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Defined new index iterator class, STIdxIter2.
STIdxIter2 has almost same functionality as STIdxIter and support
various kind of data.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STIdxIter.h

    r2580 r2911  
    88#include <casa/Arrays/IPosition.h>
    99#include <casa/BasicSL/String.h>
     10
     11#include <casa/Utilities/Sort.h>
    1012
    1113#include "Scantable.h"
     
    155157} ;
    156158
     159class STIdxIter2
     160{
     161public:
     162  STIdxIter2() ;
     163  STIdxIter2( const string &name,
     164                             const vector<string> &cols ) ;
     165  STIdxIter2( const CountedPtr<Scantable> &s,
     166                          const vector<string> &cols ) ;
     167  virtual ~STIdxIter2() ;
     168  Record currentValue();
     169  Bool pastEnd() ;
     170  void next() ;
     171  Vector<uInt> getRows(StorageInitPolicy policy=COPY) ;
     172  vector<uInt> getRowsSTL() { return tovector( getRows() ) ; } ;
     173  virtual void init();
     174private:
     175  vector<uInt> tovector(Vector<uInt> v);
     176  void addSortKey(const string &name);
     177  template<class T, DataType U> void addColumnToKey(const string &name);
     178  void deallocate();
     179  vector<string> cols_;
     180  Table table_;
     181  uInt counter_;
     182  uInt num_iter_;
     183  uInt num_row_;
     184  Sort sorter_;
     185  Vector<uInt> index_;
     186  Vector<uInt> unique_;
     187  vector<void*> pointer_;
     188} ;
     189
    157190} // namespace
    158191#endif /* _ASAP_INDEX_ITERATOR_H_ */
Note: See TracChangeset for help on using the changeset viewer.