#include "include/fb_generated.h"
#include "policy.hpp"
#include "serialization_traits.hpp"
-
+#include <boost/tokenizer.hpp>
#include <memory>
namespace ldp_serialized {
size_t stringGetSize(const flatbuffers::String *str) const
{ return str->size(); }
+ typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
+
private:
const FB::File *file{nullptr};
+
+ template <typename MatchItem>
+ auto getPolicySet() const;
+
+ template <typename T, typename P>
+ ldp_xml_parser::DecisionItem getDecisionItem(const T &item, const P *policy) const;
+
+ ldp_xml_parser::DecisionItem getDecisionItemFromSendIndex(const ldp_xml_parser::MatchItemSend &item, const FB::PolicySend *policy) const;
+
+ template <typename T, typename P>
+ ldp_xml_parser::DecisionItem getDecisionItemMaybeNull(const T &item, const P *policyPair) const;
+
+ auto getDecisionItemFromTree(const FB::PolicyOwnNode *node,
+ const tokenizer::iterator &tokens_end,
+ tokenizer::iterator &iterator) const;
+
+ template <typename T, typename I>
+ bool match(const T &match, const I *i) const;
+
+ bool match(const ldp_xml_parser::MatchItemAccess &match, const FB::ItemAccess *item) const;
+
+ boost::string_ref toStringRef(const flatbuffers::String *str) const;
};
}