Kea  1.5.0
client_class_def_parser.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef CLIENT_CLASS_DEF_PARSER_H
8 #define CLIENT_CLASS_DEF_PARSER_H
9 
10 #include <cc/data.h>
11 #include <cc/simple_parser.h>
12 #include <eval/eval_context.h>
14 #include <functional>
15 #include <list>
16 
54 namespace isc {
55 namespace dhcp {
56 
63 public:
64 
73  void parse(ExpressionPtr& expression,
74  isc::data::ConstElementPtr expression_cfg,
75  uint16_t family,
78 };
79 
84 public:
85 
99  void parse(ClientClassDictionaryPtr& class_dictionary,
100  isc::data::ConstElementPtr client_class_def,
101  uint16_t family,
102  bool append_error_position = true);
103 
113  void checkParametersSupported(const isc::data::ConstElementPtr& class_def_cfg,
114  const uint16_t family);
115 };
116 
118 typedef boost::shared_ptr<ClientClassDefParser> ClientClassDefParserPtr;
119 
127 public:
128 
141  parse(isc::data::ConstElementPtr class_def_list, uint16_t family);
142 };
143 
144 } // end of namespace isc::dhcp
145 } // end of namespace isc
146 
147 #endif // CLIENT_CLASS_DEF_PARSER_H
isc::dhcp::ClientClassDictionaryPtr
boost::shared_ptr< ClientClassDictionary > ClientClassDictionaryPtr
Defines a pointer to a ClientClassDictionary.
Definition: client_class_def.h:382
isc::dhcp::ExpressionPtr
boost::shared_ptr< Expression > ExpressionPtr
Definition: token.h:30
isc::eval::EvalContext::CheckDefined
std::function< bool(const ClientClass &)> CheckDefined
Type of the check defined function.
Definition: eval_context.h:45
isc::dhcp::ClientClassDefListParser
Parser for a list of client class definitions.
Definition: client_class_def_parser.h:126
isc::dhcp::ClientClassDefParserPtr
boost::shared_ptr< ClientClassDefParser > ClientClassDefParserPtr
Defines a pointer to a ClientClassDefParser.
Definition: client_class_def_parser.h:118
isc::dhcp::ClientClassDefParser::parse
void parse(ClientClassDictionaryPtr &class_dictionary, isc::data::ConstElementPtr client_class_def, uint16_t family, bool append_error_position=true)
Parses an entry that describes single client class definition.
Definition: client_class_def_parser.cc:70
isc::dhcp::ExpressionParser
Parser for a logical expression.
Definition: client_class_def_parser.h:62
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::dhcp::ClientClassDefParser::checkParametersSupported
void checkParametersSupported(const isc::data::ConstElementPtr &class_def_cfg, const uint16_t family)
Iterates over class parameters and checks if they are supported.
Definition: client_class_def_parser.cc:223
isc::data::SimpleParser
A simple parser.
Definition: lib/cc/simple_parser.h:60
isc::dhcp::ClientClassDefListParser::parse
ClientClassDictionaryPtr parse(isc::data::ConstElementPtr class_def_list, uint16_t family)
Parse configuration entries.
Definition: client_class_def_parser.cc:260
eval_context.h
isc::dhcp::ExpressionParser::parse
void parse(ExpressionPtr &expression, isc::data::ConstElementPtr expression_cfg, uint16_t family, isc::eval::EvalContext::CheckDefined check_defined=isc::eval::EvalContext::acceptAll)
Parses an expression configuration element into an Expression.
Definition: client_class_def_parser.cc:38
data.h
isc::eval::EvalContext::acceptAll
static bool acceptAll(const ClientClass &client_class)
Accept all client class names.
Definition: eval_context.cc:33
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
client_class_def.h
Defines classes for storing client class definitions.
isc::dhcp::ClientClassDefParser
Parser for a single client class definition.
Definition: client_class_def_parser.h:83
simple_parser.h