PolyBoRi
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
polybori
include
CDelayedTermIter.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//*****************************************************************************
40
//*****************************************************************************
41
42
// include basic definitions
43
#include "
pbori_defs.h
"
44
45
// include CTermIter definitions
46
#include "
CTermIter.h
"
47
48
#ifndef CDelayedTermIter_h_
49
#define CDelayedTermIter_h_
50
51
BEGIN_NAMESPACE_PBORI
52
58
template
<
class
TermType,
class
AppendOp,
class
TerminalValueOp,
class
DegIterBase>
59
class
CDelayedTermIter
:
60
public
DegIterBase {
61
62
public
:
63
typedef
TermType
term_type
;
64
typedef
typename
term_type::size_type
size_type
;
65
typedef
DegIterBase
base
;
66
67
68
typedef
CDelayedTermIter<term_type, AppendOp, TerminalValueOp, DegIterBase>
self
;
69
70
typedef
typename
base::stack_type
stack_type
;
71
typedef
AppendOp
appendop_type
;
72
typedef
TerminalValueOp
terminalop_type
;
73
75
CDelayedTermIter
():
base
() {}
76
78
CDelayedTermIter
(
const
self
& rhs):
base
(rhs) {}
79
81
CDelayedTermIter
(
const
base
& rhs):
base
(rhs) {}
82
84
~CDelayedTermIter
() {}
85
86
term_type
term
()
const
{
87
stack_type
the_stack(base::getStack());
88
89
term_type
result;
90
result =
terminalop_type
()(result, !the_stack.empty());
91
92
appendop_type
do_append;
93
94
while
(!the_stack.empty() && the_stack.top().isValid()) {
95
96
result = do_append(result, *the_stack.top() );
97
the_stack.pop();
98
}
99
100
return
result;
101
}
102
};
103
104
105
END_NAMESPACE_PBORI
106
107
#endif
Generated on Wed Apr 16 2014 05:41:14 for PolyBoRi by
1.8.1.2