1 | #ifndef ATOMDESCRIPTOR_IMPL_HPP
|
---|
2 | #define ATOMDESCRIPTOR_IMPL_HPP
|
---|
3 |
|
---|
4 | #include "Descriptors/AtomDescriptor.hpp"
|
---|
5 |
|
---|
6 | /************************ Declarations of implementation Objects ************************/
|
---|
7 |
|
---|
8 | class AtomDescriptor_impl
|
---|
9 | {
|
---|
10 | friend class AtomDescriptor;
|
---|
11 | public:
|
---|
12 |
|
---|
13 | AtomDescriptor_impl();
|
---|
14 | virtual ~AtomDescriptor_impl();
|
---|
15 |
|
---|
16 | virtual bool predicate(std::pair<atomId_t,atom*>)=0;
|
---|
17 |
|
---|
18 | protected:
|
---|
19 | virtual atom* find();
|
---|
20 | virtual std::vector<atom*> findAll();
|
---|
21 | World::AtomSet& getAtoms();
|
---|
22 | };
|
---|
23 |
|
---|
24 | /************************** Universe and Emptyset *****************/
|
---|
25 |
|
---|
26 | class AtomAllDescriptor_impl : public AtomDescriptor_impl {
|
---|
27 | public:
|
---|
28 | AtomAllDescriptor_impl();
|
---|
29 | virtual ~AtomAllDescriptor_impl();
|
---|
30 | virtual bool predicate(std::pair<atomId_t,atom*>);
|
---|
31 | };
|
---|
32 |
|
---|
33 | class AtomNoneDescriptor_impl : public AtomDescriptor_impl {
|
---|
34 | public:
|
---|
35 | AtomNoneDescriptor_impl();
|
---|
36 | virtual ~AtomNoneDescriptor_impl();
|
---|
37 | virtual bool predicate(std::pair<atomId_t,atom*>);
|
---|
38 | };
|
---|
39 |
|
---|
40 | /************************** Operator stuff ************************/
|
---|
41 |
|
---|
42 | class AtomAndDescriptor_impl : public AtomDescriptor_impl
|
---|
43 | {
|
---|
44 | public:
|
---|
45 | AtomAndDescriptor_impl(AtomDescriptor::impl_ptr _lhs, AtomDescriptor::impl_ptr _rhs);
|
---|
46 | ~AtomAndDescriptor_impl();
|
---|
47 | virtual bool predicate(std::pair<atomId_t,atom*>);
|
---|
48 |
|
---|
49 | private:
|
---|
50 | AtomDescriptor::impl_ptr lhs;
|
---|
51 | AtomDescriptor::impl_ptr rhs;
|
---|
52 | };
|
---|
53 |
|
---|
54 | class AtomOrDescriptor_impl : public AtomDescriptor_impl
|
---|
55 | {
|
---|
56 | public:
|
---|
57 | AtomOrDescriptor_impl(AtomDescriptor::impl_ptr _lhs, AtomDescriptor::impl_ptr _rhs);
|
---|
58 | virtual ~AtomOrDescriptor_impl();
|
---|
59 | virtual bool predicate(std::pair<atomId_t,atom*>);
|
---|
60 |
|
---|
61 | private:
|
---|
62 | AtomDescriptor::impl_ptr lhs;
|
---|
63 | AtomDescriptor::impl_ptr rhs;
|
---|
64 | };
|
---|
65 |
|
---|
66 | class AtomNotDescriptor_impl : public AtomDescriptor_impl
|
---|
67 | {
|
---|
68 | public:
|
---|
69 | AtomNotDescriptor_impl(AtomDescriptor::impl_ptr _arg);
|
---|
70 | virtual ~AtomNotDescriptor_impl();
|
---|
71 |
|
---|
72 | virtual bool predicate(std::pair<atomId_t,atom*>);
|
---|
73 |
|
---|
74 | private:
|
---|
75 | AtomDescriptor::impl_ptr arg;
|
---|
76 | };
|
---|
77 |
|
---|
78 | #endif //ATOMDESCRIPTOR_IMPL_HPP
|
---|