PandA-2024.02
Macros | Functions
tree_node_finder.cpp File Reference

tree node finder. More...

#include "tree_node_finder.hpp"
#include "exceptions.hpp"
#include "token_interface.hpp"
#include <boost/lexical_cast.hpp>
#include "ext_tree_node.hpp"
#include "tree_basic_block.hpp"
#include "tree_node.hpp"
#include "tree_reindex.hpp"
Include dependency graph for tree_node_finder.cpp:

Go to the source code of this file.

Macros

#define CHECK_VALUE_OPT(token, value)   check_value_opt(tree_node_schema.find(TOK(token)), tree_node_schema.end(), value)
 
#define CHECK_TREE_NODE_OPT(token, treeN)   check_tree_node_opt(tree_node_schema.find(TOK(token)), tree_node_schema.end(), treeN, STOK(token))
 
#define TREE_NOT_YET_IMPLEMENTED(token)
 

Functions

template<class type >
static bool check_value_opt (const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &it_element, const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &it_end, const type &value)
 
static bool check_value_opt (const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &it_element, const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &it_end, const TreeVocabularyTokenTypes_TokenEnum &value)
 
static bool check_tree_node_opt (const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &it_element, const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &it_end, const tree_nodeRef &tn, const std::string &)
 

Detailed Description

tree node finder.

This class exploiting the visitor design pattern find a tree node in a tree_manager.

Author
Fabrizio Ferrandi fabri.nosp@m.zio..nosp@m.ferra.nosp@m.ndi@.nosp@m.polim.nosp@m.i.it $Revision$ $Date$ Last modified by $Author$

Definition in file tree_node_finder.cpp.

Macro Definition Documentation

◆ CHECK_TREE_NODE_OPT

#define CHECK_TREE_NODE_OPT (   token,
  treeN 
)    check_tree_node_opt(tree_node_schema.find(TOK(token)), tree_node_schema.end(), treeN, STOK(token))

Definition at line 79 of file tree_node_finder.cpp.

◆ CHECK_VALUE_OPT

#define CHECK_VALUE_OPT (   token,
  value 
)    check_value_opt(tree_node_schema.find(TOK(token)), tree_node_schema.end(), value)

Definition at line 69 of file tree_node_finder.cpp.

◆ TREE_NOT_YET_IMPLEMENTED

#define TREE_NOT_YET_IMPLEMENTED (   token)
Value:
THROW_ASSERT(tree_node_schema.find(TOK(token)) == tree_node_schema.end(), \
std::string("field not yet supported ") + STOK(token))
#define STOK(token)
Macro used to convert a token symbol into the corresponding string.
#define TOK(token)
Macro used to convert a token symbol into a treeVocabularyTokenTypes.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...
Definition: exceptions.hpp:289

Definition at line 82 of file tree_node_finder.cpp.

Function Documentation

◆ check_tree_node_opt()

static bool check_tree_node_opt ( const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &  it_element,
const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &  it_end,
const tree_nodeRef tn,
const std::string &   
)
static

Definition at line 72 of file tree_node_finder.cpp.

References GET_INDEX_NODE.

◆ check_value_opt() [1/2]

template<class type >
static bool check_value_opt ( const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &  it_element,
const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &  it_end,
const type value 
)
static

Definition at line 54 of file tree_node_finder.cpp.

References test_panda::type.

◆ check_value_opt() [2/2]

static bool check_value_opt ( const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &  it_element,
const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string >::const_iterator &  it_end,
const TreeVocabularyTokenTypes_TokenEnum value 
)
static

Definition at line 61 of file tree_node_finder.cpp.


Generated on Mon Feb 12 2024 13:03:34 for PandA-2024.02 by doxygen 1.8.13