22 #ifndef __M2ETIS_PUBSUB_FILTER_DECISIONTREEWALKERVISITOR_H__
23 #define __M2ETIS_PUBSUB_FILTER_DECISIONTREEWALKERVISITOR_H__
32 template<
typename EventType,
typename NetworkType>
33 class DecisionTreeWalkerVisitor :
public FilterVisitor<EventType> {
42 M2ETIS_THROW_API(
"DecisionTreeRemoveSubscriberVisitor",
"FilterExp not allowed in decision tree filter strategy.");
49 M2ETIS_THROW_API(
"DecisionTreeRemoveSubscriberVisitor",
"OrExp not allowed in decision tree filter strategy.");
53 if (current_decision_tree_node_ptr_) {
55 attribute_type_information.decision_tree_node_ptr_ = current_decision_tree_node_ptr_;
59 current_decision_tree_node_ptr_ = attribute_type_information.decision_tree_node_ptr_;
65 attribute_type_information(filter, decision_tree_ptr, 0);
66 delete decision_tree_ptr;
71 attribute_type_information(filter, decision_tree_ptr, 0);
72 delete decision_tree_ptr;
78 return current_decision_tree_node_ptr_;
82 boost::shared_ptr<DecisionTreeNode<EventType, NetworkType> > * current_decision_tree_node_ptr_;
virtual void Visit(const AndExp< EventType > *) override
virtual void getAttributeType(const EqualsAttributeFilter< EventType, int > *filter)
DecisionTreeWalkerVisitor(boost::shared_ptr< DecisionTreeNode< EventType, NetworkType > > *v)
virtual void Visit(const Predicate< EventType > *equals_predicate) override
boost::shared_ptr< DecisionTreeNode< EventType, NetworkType > > * get_current_decision_tree_node_ptr()
virtual ~DecisionTreeWalkerVisitor()
virtual void getAttributeType(const EqualsAttributeFilter< EventType, std::string > *filter)
virtual void Visit(const FilterExp< EventType > *) override
virtual void Visit(const OrExp< EventType > *) override
#define M2ETIS_THROW_API(module, message)
throws on wrong API usage
virtual void getAttributeType(FilterVisitor< EventType > &visitor) const =0