22 #ifndef __M2ETIS_PUBSUB_FILTER_DECISIONTREE_DECISIONTREENODE_H__
23 #define __M2ETIS_PUBSUB_FILTER_DECISIONTREE_DECISIONTREENODE_H__
34 template<
typename EventType,
typename NetworkType>
40 virtual void visit(
const EventType & event, std::set<typename NetworkType::Key> &) = 0;
49 M2ETIS_THROW_API(
"DecisionTreeNode",
"addSubscriber called for non-leaf node.");
54 M2ETIS_THROW_API(
"DecisionTreeNode",
"removeSubscriber called for non-leaf node.");
58 M2ETIS_THROW_API(
"DecisionTreeNode",
"hasSubscriber called for non-leaf node.");
64 virtual operator std::string()
const {
65 return typeid(*this).name();
69 template<
typename Archive>
70 void serialize(Archive & ar,
const unsigned int version) {
void serialize(Archive &ar, const unsigned int version)
virtual void addSubscriber(const typename NetworkType::Key &)
virtual void merge(boost::shared_ptr< DecisionTreeNode< EventType, NetworkType > > &other_tree, typename NetworkType::Key subscriber)=0
virtual bool hasSubscription(typename NetworkType::Key subscriber)=0
virtual void visit(const EventType &event, std::set< typename NetworkType::Key > &)=0
friend class boost::serialization::access
virtual void removeSubscriber(const typename NetworkType::Key &)
virtual bool hasSubscriber()
virtual void changeSubscriber(typename NetworkType::Key subscriber)=0
virtual ~DecisionTreeNode()
#define M2ETIS_THROW_API(module, message)
throws on wrong API usage