Zigbee Protocol Controller 1.6.0
attribute_mapper_ast_path_match_eval.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
29#ifndef ATTRIBUTE_MAPPER_AST_PATH_MATCH_EVAL_HPP
30#define ATTRIBUTE_MAPPER_AST_PATH_MATCH_EVAL_HPP
31
32#include "attribute.hpp"
34
35namespace ast
36{
37
43{
44 public:
53 attribute_store_type_t _common_parent_type);
54
58 void reset();
59
60 // AST traversal functions
62 bool operator()(const nil);
64 bool operator()(const attribute_path_subscript &subscript);
65 bool operator()(const attribute_path_element &path_element);
66 bool operator()(const std::vector<attribute_path_element> &paths);
67
68 private:
69 // Attribute initially set as the final destination
71 // Common parent type configured in the scope.
73 // Attribute used for navigation.
75 // Boolean indicating if we compare attribute value or type. True for value, false for type.
76 bool comparing_value = false;
77};
78
79} // namespace ast
80
81#endif //ATTRIBUTE_MAPPER_AST_PATH_MATCH_EVAL_HPP
attribute store C++ wrapper.
Path Match Evaluation Class.
Definition: attribute_mapper_ast_path_match_eval.hpp:43
path_match_eval(attribute_store_node_t _attribute_to_match, attribute_store_type_t _common_parent_type)
Construct a new dep eval path object.
bool operator()(const std::vector< attribute_path_element > &paths)
attribute_store_type_t common_parent_type
Definition: attribute_mapper_ast_path_match_eval.hpp:72
attribute_store_node_t attribute_to_match
Definition: attribute_mapper_ast_path_match_eval.hpp:70
bool operator()(const attribute_path_subscript &subscript)
bool operator()(attribute_store_type_t type)
bool comparing_value
Definition: attribute_mapper_ast_path_match_eval.hpp:76
bool operator()(const nil)
bool operator()(const ast::operand &operand)
bool operator()(const attribute_path_element &path_element)
void reset()
Resets the navigation data, so it can perform a new evaluation.
attribute_store_node_t current_attribute
Definition: attribute_mapper_ast_path_match_eval.hpp:74
Definition: attribute_mapper_ast.hpp:39
boost::variant< ast::nil, ast::operand, uint32_t, attribute_path_subscript > attribute_path_element
Attribute path element.
Definition: attribute_mapper_ast.hpp:104
x3::variant< ast::nil, uint32_t, float, x3::forward_ast< attribute >, x3::forward_ast< signed_ >, x3::forward_ast< expression >, x3::forward_ast< condition >, x3::forward_ast< function_invokation > > operand
Operands.
Definition: attribute_mapper_ast.hpp:95
Attribute path subscript.
Definition: attribute_mapper_ast.hpp:160
Definition: attribute_mapper_ast.hpp:42