PolyBoRi
PBoRiOutIter.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
13 //*****************************************************************************
14 
15 #ifndef polybori_iterators_PBoRiOutIter_h_
16 #define polybori_iterators_PBoRiOutIter_h_
17 
18 // include basic definitions
19 #include <polybori/pbori_defs.h>
20 
22 
30 template <class DataType, class RhsType, class BinOp>
31 class PBoRiOutIter {
32 public:
33 
35  typedef DataType data_type;
36 
38  typedef RhsType rhs_type;
39 
41  typedef BinOp op_type;
42 
45 
47 
48  typedef std::output_iterator_tag iterator_category;
49  typedef void difference_type;
50  typedef void pointer;
51  typedef void reference;
52  typedef void value_type;
54 
57  data(data_), op(op_) {}
58 
60  PBoRiOutIter(const self& rhs):
61  data(rhs.data), op(rhs.op) {}
62 
65 
68  self& operator*() { return *this; }
69 
71  self& operator=(const self& rhs) {
72  data = rhs.data;
73  op = rhs.op;
74  return *this;
75  }
76 
78  self& operator=(rhs_type rhs){
79  op(data, rhs);
80  return *this;
81  }
82 
84  self& operator++() { return *this; }
85 
87  self operator++(int) { return *this; }
88 
89 protected:
92 };
93 
94 
96 
97 #endif