PBoRiOutIter.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_iterators_PBoRiOutIter_h_
#define polybori_iterators_PBoRiOutIter_h_
// include basic definitions
#include <polybori/pbori_defs.h>
BEGIN_NAMESPACE_PBORI
template <class DataType, class RhsType, class BinOp>
class PBoRiOutIter {
public:
typedef DataType data_type;
typedef RhsType rhs_type;
typedef BinOp op_type;
typedef PBoRiOutIter<data_type, rhs_type, op_type> self;
typedef std::output_iterator_tag iterator_category;
typedef void difference_type;
typedef void pointer;
typedef void reference;
typedef void value_type;
PBoRiOutIter(data_type& data_, op_type op_ = op_type()):
data(data_), op(op_) {}
PBoRiOutIter(const self& rhs):
data(rhs.data), op(rhs.op) {}
~PBoRiOutIter() {}
self& operator*() { return *this; }
self& operator=(const self& rhs) {
data = rhs.data;
op = rhs.op;
return *this;
}
self& operator=(rhs_type rhs){
op(data, rhs);
return *this;
}
self& operator++() { return *this; }
self operator++(int) { return *this; }
protected:
data_type& data;
op_type op;
};
END_NAMESPACE_PBORI
#endif