m2etis  0.4
FilterInfo.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 // necessary filter type exports. Each new constraint type (filter attribute) has to be addded here.
23 
24 #ifndef __M2ETIS_MESSAGE_INFO_FILTERINFO_H__
25 #define __M2ETIS_MESSAGE_INFO_FILTERINFO_H__
26 
28 
29 #include "boost/shared_ptr.hpp"
30 
31 namespace m2etis {
32 namespace message {
33 
34  struct FilterInfo {
35  typedef boost::shared_ptr<FilterInfo> Ptr;
36 
37  // TODO: (Daniel) really necessary for every strategy (e.g. NullFilter)???
38  bool isUnsubscribe_ = false; // unsubscripitons of single filters are sent via subscribe
39  // messages as well to avoid corrupting routing strategies.
40  // however, the filter strategies may store here whether the subscribe message actually contains a filter
41  // to be removed
42 
44 
45  virtual ~FilterInfo() {}
46 
47  friend class boost::serialization::access; // not sure if necessary
48  template<typename Archive>
49  void serialize(Archive & ar, const unsigned int) {
50  ar & isUnsubscribe_;
51  }
52  };
53 
54 } /* namespace message */
55 } /* namespace m2etis */
56 
57 #endif /* __M2ETIS_MESSAGE_INFO_FILTERINFO_H__ */
58 
boost::shared_ptr< FilterInfo > Ptr
Definition: FilterInfo.h:35
void serialize(Archive &ar, const unsigned int)
Definition: FilterInfo.h:49
friend class boost::serialization::access
Definition: FilterInfo.h:47