klee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
13 namespace klee {
14  struct KInstruction;
15 
16  class KInstIterator {
18 
19  public:
20  KInstIterator() : it(0) {}
21  KInstIterator(KInstruction **_it) : it(_it) {}
22  KInstIterator(const KInstIterator &b) : it(b.it) {}
24 
26  it = b.it;
27  return *this;
28  }
29 
30  bool operator==(const KInstIterator &b) const {
31  return it==b.it;
32  }
33  bool operator!=(const KInstIterator &b) const {
34  return !(*this == b);
35  }
36 
38  ++it;
39  return *this;
40  }
41 
42  operator KInstruction*() const { return it ? *it : 0;}
43  operator bool() const { return it != 0; }
44 
45  KInstruction *operator ->() const { return *it; }
46  };
47 } // End klee namespace
48 
49 #endif
KInstIterator(KInstruction **_it)
Definition: KInstIterator.h:21
bool operator!=(const KInstIterator &b) const
Definition: KInstIterator.h:33
KInstruction ** it
Definition: KInstIterator.h:17
KInstIterator & operator++()
Definition: KInstIterator.h:37
KInstIterator & operator=(const KInstIterator &b)
Definition: KInstIterator.h:25
KInstIterator(const KInstIterator &b)
Definition: KInstIterator.h:22
KInstruction * operator->() const
Definition: KInstIterator.h:45
bool operator==(const KInstIterator &b) const
Definition: KInstIterator.h:30