ROSE 0.11.145.147
PathQueue.h
1#ifndef ROSE_BinaryAnalysis_ModelChecker_PathQueue_H
2#define ROSE_BinaryAnalysis_ModelChecker_PathQueue_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
5
6#include <Rose/BinaryAnalysis/ModelChecker/BasicTypes.h>
7
8namespace Rose {
9namespace BinaryAnalysis {
10namespace ModelChecker {
11
16class PathQueue final {
17public:
19 class Visitor {
20 public:
21 virtual ~Visitor() {}
22
27 virtual bool operator()(const PathPtr&) = 0;
28 };
29
30private:
31 mutable SAWYER_THREAD_TRAITS::Mutex mutex_; // protects all following data members
32 PathPrioritizerPtr prioritizer_;
33 std::vector<PathPtr> paths_;
34
35public:
36 PathQueue() = delete;
37
41 PathQueue(const PathPrioritizerPtr&);
42 ~PathQueue();
43
44public:
56 PathPrioritizerPtr prioritizer() const;
57 void prioritizer(const PathPrioritizerPtr&);
65 size_t size() const;
66
72 bool isEmpty() const;
73
79 void reset();
80
86 void insert(const PathPtr&);
87
95 PathPtr takeNext();
96
103 void traverse(Visitor&) const;
104};
105
106} // namespace
107} // namespace
108} // namespace
109
110#endif
111#endif
The ROSE library.