m2etis  0.4
FilterVisitor.h
Go to the documentation of this file.
1 /*
2  Copyright (2016) Michael Baer, Daniel Bonrath, All rights reserved.
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15  */
16 
22 #ifndef __M2ETIS_PUBSUB_FILTER_FILTEVISITORS_FILTERVISITOR_H__
23 #define __M2ETIS_PUBSUB_FILTER_FILTEVISITORS_FILTERVISITOR_H__
24 
25 namespace m2etis {
26 namespace pubsub {
27 namespace filter {
28 
29  template <typename EventType> class FilterExp;
30  template <typename EventType> class AndExp;
31  template <typename EventType> class OrExp;
32  template <typename EventType> class Predicate;
33  template <typename EventType, typename AttributeType> class GreaterThanAttributeFilter;
34  template <typename EventType, typename AttributeType> class LessThanAttributeFilter;
35  template <typename EventType, typename AttributeType> class EqualsAttributeFilter;
36  template <typename EventType, typename AttributeType> class NotEqualsAttributeFilter;
37  template <typename EventType, typename AttributeType> class AttributeFilter;
38 
39  template <typename EventType>
40  class FilterVisitor {
41  public:
42  virtual ~FilterVisitor() {}
43 
44  virtual void Visit(const FilterExp<EventType> *) = 0;
45  virtual void Visit(const AndExp<EventType> *) = 0;
46  virtual void Visit(const OrExp<EventType> *) = 0;
47  virtual void Visit(const Predicate<EventType> *) = 0;
48 
50  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType with const GreaterThanAttributeFilter<EventType, std::string> * called.");
51  }
52 
54  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType with const GreaterThanAttributeFilter<EventType, std::int> * called.");
55  }
56 
58  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType called.");
59  }
60 
62  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType called.");
63  }
64 
66  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType called.");
67  }
68 
70  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType called.");
71  }
72 
74  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType called.");
75  }
76 
78  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType called.");
79  }
80 
82  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType with const AttributeFilter<EventType, std::string> * called.");
83  }
84 
86  M2ETIS_THROW_API("FilterVisitor", "unimplemented method getAttributeType with const AttributeFilter<EventType, int> * called.");
87  }
88 
89  protected:
91  };
92 
93 } /* namespace filter */
94 } /* namespace pubsub */
95 } /* namespace m2etis */
96 
97 #endif /* __M2ETIS_PUBSUB_FILTER_FILTEVISITORS_FILTERVISITOR_H__ */
98 
virtual void getAttributeType(const GreaterThanAttributeFilter< EventType, std::string > *)
Definition: FilterVisitor.h:49
virtual void getAttributeType(const AttributeFilter< EventType, std::string > *)
Definition: FilterVisitor.h:81
virtual void getAttributeType(const EqualsAttributeFilter< EventType, std::string > *)
Definition: FilterVisitor.h:65
virtual void getAttributeType(const LessThanAttributeFilter< EventType, std::string > *)
Definition: FilterVisitor.h:57
virtual void getAttributeType(const AttributeFilter< EventType, int > *)
Definition: FilterVisitor.h:85
virtual void getAttributeType(const NotEqualsAttributeFilter< EventType, int > *)
Definition: FilterVisitor.h:77
virtual void getAttributeType(const EqualsAttributeFilter< EventType, int > *)
Definition: FilterVisitor.h:69
virtual void Visit(const FilterExp< EventType > *)=0
virtual void getAttributeType(const NotEqualsAttributeFilter< EventType, std::string > *)
Definition: FilterVisitor.h:73
#define M2ETIS_THROW_API(module, message)
throws on wrong API usage
Definition: Exceptions.h:40
virtual void getAttributeType(const LessThanAttributeFilter< EventType, int > *)
Definition: FilterVisitor.h:61
virtual void getAttributeType(const GreaterThanAttributeFilter< EventType, int > *)
Definition: FilterVisitor.h:53