PolyBoRi
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
libpolybori
include
polybori
iterators
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
21
BEGIN_NAMESPACE_PBORI
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
44
typedef
PBoRiOutIter<data_type, rhs_type, op_type>
self
;
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
56
PBoRiOutIter
(
data_type
& data_,
op_type
op_ =
op_type
()):
57
data(data_), op(op_) {}
58
60
PBoRiOutIter
(
const
self
& rhs):
61
data(rhs.data), op(rhs.op) {}
62
64
~PBoRiOutIter
() {}
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
:
90
data_type
&
data
;
91
op_type
op
;
92
};
93
94
95
END_NAMESPACE_PBORI
96
97
#endif
Generated by
1.8.3.1