m2etis  0.4
GeneralBooleanExpressionsFilterInfo.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_MESSAGE_GENERALBOOLEANEXPRESSIONSFILTERINFO_H__
23 #define __M2ETIS_MESSAGE_GENERALBOOLEANEXPRESSIONSFILTERINFO_H__
24 
25 #include <set>
26 
29 
30 #include "boost/serialization/base_object.hpp"
31 
32 namespace m2etis {
33 namespace message {
34 
35  template<class EventType>
37  public:
38  typedef boost::shared_ptr<GeneralBooleanExpressionsFilterInfo<EventType>> Ptr;
39 
40  static bool doSerialize(ActionType t) {
41  if (t == NOTIFY || t == PUBLISH || t == JOIN || t == STATE || t == LEAVE) {
42  return false;
43  }
44 
45  return true;
46  }
47 
48  std::set<boost::shared_ptr<pubsub::filter::FilterExp<EventType>>> dynamic_filter_;
49 
50  private:
52  template<typename Archive>
53  void serialize(Archive & ar, const unsigned int version) {
54  ar & boost::serialization::base_object<FilterInfo>(*this);
55  ar & dynamic_filter_;
56  }
57  };
58 
59 } /* namespace message */
60 } /* namespace m2etis */
61 
62 #endif /* __M2ETIS_MESSAGE_GENERALBOOLEANEXPRESSIONSFILTERINFO_H__ */
63 
std::set< boost::shared_ptr< pubsub::filter::FilterExp< EventType > > > dynamic_filter_
boost::shared_ptr< GeneralBooleanExpressionsFilterInfo< EventType > > Ptr