PolyBoRi
PBoRiOutIter.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
36 //*****************************************************************************
37 
38 // include basic definitions
39 #include "pbori_defs.h"
40 
41 #ifndef PBoRiOutIter_h_
42 #define PBoRiOutIter_h_
43 
45 
53 template <class DataType, class RhsType, class BinOp>
54 class PBoRiOutIter {
55 public:
56 
58  typedef DataType data_type;
59 
61  typedef RhsType rhs_type;
62 
64  typedef BinOp op_type;
65 
68 
70 
71  typedef std::output_iterator_tag iterator_category;
72  typedef void difference_type;
73  typedef void pointer;
74  typedef void reference;
75  typedef void value_type;
77 
80  data(data_), op(op_) {}
81 
83  PBoRiOutIter(const self& rhs):
84  data(rhs.data), op(rhs.op) {}
85 
88 
91  self& operator*() { return *this; }
92 
94  self& operator=(const self& rhs) {
95  data = rhs.data;
96  op = rhs.op;
97  return *this;
98  }
99 
101  self& operator=(rhs_type rhs){
102  op(data, rhs);
103  return *this;
104  }
105 
107  self& operator++() { return *this; }
108 
110  self operator++(int) { return *this; }
111 
112 protected:
115 };
116 
117 
119 
120 #endif