Zigbee Protocol Controller 1.6.0
ast::attribute_path_eval Struct Reference

The attribute path evaluator evalues a full attribute path and returns the matching attribute store attribute for that attribute path. More...

#include <attribute_mapper_ast_path_eval.hpp>

Public Member Functions

 attribute_path_eval (const attribute_store::attribute context)
 Construct a new attribute path eval object. More...
 
attribute_store::attribute operator() (const ast::operand &oper)
 Evaluates numbers and expressions into attributes. More...
 
attribute_store::attribute operator() (const nil &nul)
 hat operator ^ (parent) More...
 
attribute_store::attribute operator() (const attribute_store_type_t type_id)
 just given by type More...
 
attribute_store::attribute operator() (const attribute_path_subscript &subscript) const
 Subscript operator. More...
 
attribute_store::attribute operator() (const std::vector< attribute_path_element > &paths)
 parse a path list return the last successfull evaluated attribute More...
 
bool all_elements_parsed () const
 
bool last_token_failed () const
 
attribute_store_type_t last_fail_type () const
 
size_t get_depth (const std::vector< attribute_path_element > &paths) const
 

Private Attributes

attribute_store_type_t last_type_id = 0
 
int elements_left = 0
 
attribute_store::attribute context = 0
 

Detailed Description

The attribute path evaluator evalues a full attribute path and returns the matching attribute store attribute for that attribute path.

The evaluation is done in the context context.

Constructor & Destructor Documentation

◆ attribute_path_eval()

ast::attribute_path_eval::attribute_path_eval ( const attribute_store::attribute  context)
inlineexplicit

Construct a new attribute path eval object.

Parameters
contextparent on the attribute store

Member Function Documentation

◆ all_elements_parsed()

bool ast::attribute_path_eval::all_elements_parsed ( ) const
inline

Return true if the path has been fully resolved

◆ get_depth()

size_t ast::attribute_path_eval::get_depth ( const std::vector< attribute_path_element > &  paths) const

Return the depth of the path, ie the number ofr path elemnts

◆ last_fail_type()

attribute_store_type_t ast::attribute_path_eval::last_fail_type ( ) const
inline

get the type is of the last element that was attempted to be parsed

◆ last_token_failed()

bool ast::attribute_path_eval::last_token_failed ( ) const
inline

return true if all but the last path elements has been resolved

◆ operator()() [1/5]

attribute_store::attribute ast::attribute_path_eval::operator() ( const ast::operand oper)

Evaluates numbers and expressions into attributes.

◆ operator()() [2/5]

attribute_store::attribute ast::attribute_path_eval::operator() ( const attribute_path_subscript subscript) const

Subscript operator.

◆ operator()() [3/5]

attribute_store::attribute ast::attribute_path_eval::operator() ( const attribute_store_type_t  type_id)

just given by type

◆ operator()() [4/5]

attribute_store::attribute ast::attribute_path_eval::operator() ( const nil nul)

hat operator ^ (parent)

◆ operator()() [5/5]

attribute_store::attribute ast::attribute_path_eval::operator() ( const std::vector< attribute_path_element > &  paths)

parse a path list return the last successfull evaluated attribute

Member Data Documentation

◆ context

attribute_store::attribute ast::attribute_path_eval::context = 0
private

◆ elements_left

int ast::attribute_path_eval::elements_left = 0
private

◆ last_type_id

attribute_store_type_t ast::attribute_path_eval::last_type_id = 0
private

The documentation for this struct was generated from the following file: