PolyBoRi
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
polybori
include
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
44
BEGIN_NAMESPACE_PBORI
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
67
typedef
PBoRiOutIter<data_type, rhs_type, op_type>
self
;
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
79
PBoRiOutIter
(
data_type
& data_,
op_type
op_ =
op_type
()):
80
data(data_), op(op_) {}
81
83
PBoRiOutIter
(
const
self
& rhs):
84
data(rhs.data), op(rhs.op) {}
85
87
~PBoRiOutIter
() {}
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
:
113
data_type
&
data
;
114
op_type
op
;
115
};
116
117
118
END_NAMESPACE_PBORI
119
120
#endif
Generated on Wed Mar 26 2014 17:27:06 for PolyBoRi by
1.8.1.2