55 _out << std::hex <<
"0x" << type;
62 boost::apply_visitor(*
this, x.
operand_);
77 const char *op_str[] = {
"+",
94 boost::apply_visitor(*
this, x.
operand_);
100 boost::apply_visitor(*
this, x.
first);
102 for (
const auto &terms: x.
rest) {
130 _out <<
"}" << std::endl;
145 for (
const auto &ast_element:
ast) {
146 boost::apply_visitor(*
this, ast_element);
175 _out << round(type_id);
189 inline void operator()(
const std::vector<attribute_path_element> &paths)
191 for (
auto it = paths.begin(); it != paths.end(); it++) {
192 boost::apply_visitor(*
this, *it);
193 if ((it + 1) != paths.end()) {
attribute store C++ wrapper.
uint32_t attribute_store_type_t
Definition: attribute_store.h:50
Definition: attribute_mapper_ast_print.hpp:157
void operator()(result_type_t type_id)
Definition: attribute_mapper_ast_print.hpp:173
void operator()(const nil &nul)
Definition: attribute_mapper_ast_print.hpp:168
print _printer
Definition: attribute_mapper_ast_print.hpp:201
void operator()(const ast::operand &operand)
Definition: attribute_mapper_ast_print.hpp:161
std::ostream & _out
Definition: attribute_mapper_ast_print.hpp:200
path_printer(std::ostream &out)
Definition: attribute_mapper_ast_print.hpp:159
void operator()(const std::vector< attribute_path_element > &paths)
Definition: attribute_mapper_ast_print.hpp:189
void operator()(const attribute_path_subscript &subscript)
Definition: attribute_mapper_ast_print.hpp:179
Definition: attribute_mapper_ast_print.hpp:31
std::ostream & _out
Definition: attribute_mapper_ast_print.hpp:153
void operator()(const signed_ &x)
Definition: attribute_mapper_ast_print.hpp:59
void operator()(const nil &x)
Definition: attribute_mapper_ast_print.hpp:35
print(std::ostream &out)
Definition: attribute_mapper_ast_print.hpp:33
bool resolve_attr_names
Definition: attribute_mapper_ast_print.hpp:150
void operator()(const ast_tree ast)
Definition: attribute_mapper_ast_print.hpp:143
void operator()(const expression &x)
Definition: attribute_mapper_ast_print.hpp:97
void operator()(const function_invokation &f)
Definition: attribute_mapper_ast_print.hpp:133
void operator()(const assignment &a)
Definition: attribute_mapper_ast_print.hpp:109
void operator()(float n)
Definition: attribute_mapper_ast_print.hpp:40
void operator()(const condition &x)
Definition: attribute_mapper_ast_print.hpp:65
void operator()(const operation &x)
Definition: attribute_mapper_ast_print.hpp:75
void operator()(uint32_t n)
Definition: attribute_mapper_ast_print.hpp:45
void operator()(const scope &x)
Definition: attribute_mapper_ast_print.hpp:122
float result_type_t
Definition: attribute_mapper_ast.hpp:36
bool attribute_store_is_type_registered(attribute_store_type_t type)
Checks an attribute type is already registered.
const char * attribute_store_get_type_name(attribute_store_type_t type)
Returns the registered name of an attribute.
Definition: attribute_mapper_ast.hpp:39
@ INSTANCE
Definition: attribute_mapper_ast.hpp:203
@ CLEARANCE
Definition: attribute_mapper_ast.hpp:203
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
std::ostream & operator<<(std::ostream &s, const attribute_dependency_t &d)
Definition: attribute_mapper_ast_print.hpp:213
std::pair< attribute_store_type_t, value_type_t > attribute_dependency_t
Definition: attribute_mapper_ast_dep_eval.hpp:32
Assignment.
Definition: attribute_mapper_ast.hpp:193
ast::attribute lhs
left hand side of the assignment
Definition: attribute_mapper_ast.hpp:199
int type
Definition: attribute_mapper_ast.hpp:198
expression rhs
right hand side of the assignment
Definition: attribute_mapper_ast.hpp:200
Definition: attribute_mapper_ast.hpp:53
Attribute path subscript.
Definition: attribute_mapper_ast.hpp:160
operand identifier
Definition: attribute_mapper_ast.hpp:161
operand index
Definition: attribute_mapper_ast.hpp:162
Attribute.
Definition: attribute_mapper_ast.hpp:177
std::vector< attribute_path_element > attribute_path
Definition: attribute_mapper_ast.hpp:179
char value_type
Definition: attribute_mapper_ast.hpp:178
Condition.
Definition: attribute_mapper_ast.hpp:147
operand cond_true
Truth value.
Definition: attribute_mapper_ast.hpp:149
operand cond_false
False value.
Definition: attribute_mapper_ast.hpp:150
operand cond_value
Selector value.
Definition: attribute_mapper_ast.hpp:148
Expression.
Definition: attribute_mapper_ast.hpp:134
operand first
Definition: attribute_mapper_ast.hpp:135
std::list< operation > rest
Definition: attribute_mapper_ast.hpp:136
Built-in function invokation Example : fn_min_value(r'3, 5, d'5 or 20)
Definition: attribute_mapper_ast.hpp:209
std::vector< expression > arguments
Definition: attribute_mapper_ast.hpp:211
std::string function_name
Definition: attribute_mapper_ast.hpp:210
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
operator_ids operator_
+,-,*,/ etc.
Definition: attribute_mapper_ast.hpp:124
operand operand_
right hand side operand
Definition: attribute_mapper_ast.hpp:125
Scope.
Definition: attribute_mapper_ast.hpp:234
std::vector< assignment > assignments
Definition: attribute_mapper_ast.hpp:237
int priority
Definition: attribute_mapper_ast.hpp:235
Uniary signed operand.
Definition: attribute_mapper_ast.hpp:111
char sign
Definition: attribute_mapper_ast.hpp:112
operand operand_
Definition: attribute_mapper_ast.hpp:113