klee
KInstIterator.h
Go to the documentation of this file.
1//===-- KInstIterator.h -----------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_KINSTITERATOR_H
11#define KLEE_KINSTITERATOR_H
12
13namespace klee {
14 struct KInstruction;
15
18
19 public:
20 KInstIterator() : it(0) {}
21 KInstIterator(KInstruction **_it) : it(_it) {}
22
23 bool operator==(const KInstIterator &b) const {
24 return it==b.it;
25 }
26 bool operator!=(const KInstIterator &b) const {
27 return !(*this == b);
28 }
29
31 ++it;
32 return *this;
33 }
34
35 operator KInstruction*() const { return it ? *it : 0;}
36 operator bool() const { return it != 0; }
37
38 KInstruction *operator ->() const { return *it; }
39 };
40} // End klee namespace
41
42#endif /* KLEE_KINSTITERATOR_H */
bool operator!=(const KInstIterator &b) const
Definition: KInstIterator.h:26
bool operator==(const KInstIterator &b) const
Definition: KInstIterator.h:23
KInstIterator(KInstruction **_it)
Definition: KInstIterator.h:21
KInstIterator & operator++()
Definition: KInstIterator.h:30
KInstruction ** it
Definition: KInstIterator.h:17
KInstruction * operator->() const
Definition: KInstIterator.h:38
Definition: main.cpp:291