Line data Source code
1 : #pragma once
2 :
3 : #include "imatcher.hpp"
4 : #include <utility>
5 : #include <memory>
6 : #include <list>
7 :
8 :
9 : namespace wfc{ namespace jsonrpc{
10 :
11 : struct ibuilder;
12 :
13 66 : class object_match
14 : : public imatcher
15 : {
16 : public:
17 : explicit object_match( const std::shared_ptr<ibuilder>& builder );
18 : virtual bool configure(const char* beg, const char* end, json::json_error& err) override;
19 : virtual bool match(const char* beg, const char* end, json::json_error& err) override;
20 : private:
21 : typedef std::shared_ptr<imatcher> matcher_ptr;
22 : typedef std::pair<matcher_ptr, matcher_ptr> matcher_pair;
23 : typedef std::list<matcher_pair> matcher_list;
24 : std::shared_ptr<ibuilder> _builder;
25 : matcher_list _matchers;
26 : };
27 :
28 : }}
|