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