Zigbee Protocol Controller 1.6.0
attribute_mapper_ast_dep_eval.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 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
22#ifndef ATTRIBUTE_MAPPER_AST_DEP_EVAL_HPP
23#define ATTRIBUTE_MAPPER_AST_DEP_EVAL_HPP
24
25#include <set>
26#include "attribute.hpp"
28
29namespace ast
30{
31typedef char value_type_t;
32typedef std::pair<attribute_store_type_t, value_type_t> attribute_dependency_t;
33typedef std::vector<attribute_dependency_t> dependencies_t;
34
46{
47 public:
49 {
50 return dependencies;
51 }
53 {
54 return dependencies;
55 }
56
58 {
59 return dependencies;
60 }
61
67
74
81
82 private:
84};
85
93{
94 public:
101
105 const dependencies_t &operator()(const nil &nul)
106 {
107 return dependencies;
108 }
116 const dependencies_t &
117 operator()(const std::vector<attribute_path_element> &paths);
118
125
126 private:
129};
130
131} // namespace ast
132
133#endif //ATTRIBUTE_MAPPER_AST_DEP_EVAL_HPP
134
attribute store C++ wrapper.
Attribute path evaluator.
Definition: attribute_mapper_ast_dep_eval.hpp:93
const dependencies_t & operator()(attribute_store_type_t type)
just given by type
const dependencies_t & operator()(const std::vector< attribute_path_element > &paths)
parse a path list,
const dependencies_t & operator()(const nil &nul)
hat operator ^ (parent)
Definition: attribute_mapper_ast_dep_eval.hpp:105
dep_eval_path(value_type_t value_type)
Construct a new dep eval path object.
const dependencies_t & operator()(const attribute_path_subscript &subscript)
Subscript operator.
const dependencies_t & get_dependencies() const
Get the dependencies list.
const dependencies_t & operator()(const operand &operand)
operand, usually a literal constant number
const dependencies_t & operator()(const attribute_path_element &path_element)
One path element.
value_type_t value_type
Definition: attribute_mapper_ast_dep_eval.hpp:128
dependencies_t dependencies
Definition: attribute_mapper_ast_dep_eval.hpp:127
Dependency evaluator.
Definition: attribute_mapper_ast_dep_eval.hpp:46
dependencies_t dependencies
Definition: attribute_mapper_ast_dep_eval.hpp:83
const dependencies_t & operator()(const condition &x)
const dependencies_t & operator()(const function_invokation &f)
const dependencies_t & operator()(uint32_t)
Definition: attribute_mapper_ast_dep_eval.hpp:52
const dependencies_t & operator()(float)
Definition: attribute_mapper_ast_dep_eval.hpp:57
const dependencies_t & operator()(const operation &x)
const dependencies_t & operator()(const expression &x)
This is the normal entry point of the evaluator.
const dependencies_t & operator()(const signed_ &x)
const dependencies_t & operator()(const attribute &a)
const dependencies_t & get_dependencies() const
Get the list of dependencies.
const dependencies_t & operator()(nil)
Definition: attribute_mapper_ast_dep_eval.hpp:48
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
std::vector< attribute_dependency_t > dependencies_t
Definition: attribute_mapper_ast_dep_eval.hpp:33
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
char value_type_t
Definition: attribute_mapper_ast_dep_eval.hpp:31
std::pair< attribute_store_type_t, value_type_t > attribute_dependency_t
Definition: attribute_mapper_ast_dep_eval.hpp:32
Attribute path subscript.
Definition: attribute_mapper_ast.hpp:160
Attribute.
Definition: attribute_mapper_ast.hpp:177
Condition.
Definition: attribute_mapper_ast.hpp:147
Expression.
Definition: attribute_mapper_ast.hpp:134
Built-in function invokation Example : fn_min_value(r'3, 5, d'5 or 20)
Definition: attribute_mapper_ast.hpp:209
Definition: attribute_mapper_ast.hpp:42
Operation An operation consists of an operator and an right hand side operand. When operations are ev...
Definition: attribute_mapper_ast.hpp:123
Uniary signed operand.
Definition: attribute_mapper_ast.hpp:111