OpenADFortTk (including Open64 and OpenAnalysis references)
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
SetIterator.hpp
Go to the documentation of this file.
1
16
#ifndef SetIterator_H
17
#define SetIterator_H
18
19
// STL headers
20
#include <set>
21
22
#include <
OpenAnalysis/Utils/OA_ptr.hpp
>
23
24
namespace
OA {
25
26
template
<
class
T>
27
class
SetIterator
{
28
public
:
29
SetIterator
(
OA_ptr
<std::set<T> > pSet) :
mSet
(pSet),
mIter
(pSet->begin())
30
{}
31
virtual
~SetIterator
() {}
32
33
void
operator++
() {
if
(
mIter
!=
mSet
->end()) {
mIter
++; } }
34
void
operator++
(
int
) { ++*
this
; }
35
37
bool
isValid
() {
return
(
mIter
!=
mSet
->end()); }
38
40
T
current
() {
return
*
mIter
; }
41
42
void
reset
() {
mIter
=
mSet
->begin(); }
43
44
private
:
45
OA_ptr<std::set<T>
>
mSet
;
46
typename
std::set<T>::iterator
mIter
;
47
};
48
49
}
// end of OA namespace
50
51
#endif
OpenAnalysis
src
OpenAnalysis
Utils
SetIterator.hpp
Generated on Fri Mar 14 2014 04:23:14 for OpenADFortTk (including Open64 and OpenAnalysis references) by
1.8.4