PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Private Member Functions | Friends
tree_reindex Class Reference

This class is used to perform the re-index of all tree nodes. More...

#include <tree_reindex.hpp>

Inheritance diagram for tree_reindex:
Inheritance graph
[legend]
Collaboration diagram for tree_reindex:
Collaboration graph
[legend]

Public Types

enum  { GETID =(tree_node) = 0 }
 visitor enum More...
 

Public Member Functions

 ~tree_reindex () override
 
void print (std::ostream &os) const
 function that prints the class tree_reindex. More...
 
void visit (tree_node_visitor *const v) const override
 virtual function used to traverse the tree_node data structure. More...
 
- Public Member Functions inherited from tree_node
 tree_node (unsigned int i)
 Constructor. More...
 
virtual ~tree_node ()=default
 Destructor. More...
 
virtual enum kind get_kind () const =0
 Virtual function returning the type of the actual class. More...
 
virtual std::string get_kind_text () const =0
 Virtual function returning the name of the actual class. More...
 
std::string ToString () const
 Print this node as string in gimple format. More...
 

Static Public Member Functions

static void enable_html ()
 Redefinition of get_tree_node_kind_text. More...
 
static void enable_raw ()
 
- Static Public Member Functions inherited from tree_node
static enum kind get_kind (const std::string &name)
 Given a string, return the corresponding kind. More...
 
static std::string GetString (const enum kind k)
 Given a kind, return the corresponding string. More...
 

Data Fields

const tree_nodeRefactual_tree_node
 Represent the actual reference to the tree_node. More...
 
- Data Fields inherited from tree_node
const unsigned int index
 Represent the index read from the raw file and the index-1 of the vector of tree_node associated to the functions vector present in the tree_manager. More...
 

Static Public Attributes

static bool html = false
 

Private Member Functions

 tree_reindex (const unsigned int ind, const tree_nodeRef &tn)
 Private constructor with index initialization It can be accesses only by tree_manager. More...
 

Friends

class tree_manager
 

Detailed Description

This class is used to perform the re-index of all tree nodes.

Each reference to a tree_node is implemented by this type of tree_node

Definition at line 55 of file tree_reindex.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

visitor enum

Enumerator
GETID 

Definition at line 111 of file tree_reindex.hpp.

Constructor & Destructor Documentation

◆ tree_reindex()

tree_reindex::tree_reindex ( const unsigned int  ind,
const tree_nodeRef tn 
)
private

Private constructor with index initialization It can be accesses only by tree_manager.

Parameters
indis the value of the index member.
tnis the actual reference to the tree_node. NOTE: this has to be a reference since tree_nodeRef at the moment of the construction of this can not ready

Definition at line 48 of file tree_reindex.cpp.

References ~tree_reindex().

Here is the call graph for this function:

◆ ~tree_reindex()

tree_reindex::~tree_reindex ( )
overridedefault

Referenced by tree_reindex().

Here is the caller graph for this function:

Member Function Documentation

◆ enable_html()

static void tree_reindex::enable_html ( )
inlinestatic

Redefinition of get_tree_node_kind_text.

Redefinition of get_tree_node_kind. Switch the print function to the html format

Definition at line 97 of file tree_reindex.hpp.

◆ enable_raw()

static void tree_reindex::enable_raw ( )
inlinestatic

Definition at line 101 of file tree_reindex.hpp.

References visit().

Here is the call graph for this function:

◆ print()

void tree_reindex::print ( std::ostream &  os) const

function that prints the class tree_reindex.

Definition at line 54 of file tree_reindex.cpp.

References html, and tree_node::index.

◆ visit()

void tree_reindex::visit ( tree_node_visitor *const  v) const
overridevirtual

virtual function used to traverse the tree_node data structure.

Parameters
vis a reference to the tree_node visitor class

Reimplemented from tree_node.

Definition at line 66 of file tree_reindex.cpp.

References actual_tree_node, ALL_VISIT, html, and VISIT_MEMBER.

Referenced by enable_raw().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ tree_manager

friend class tree_manager
friend

Definition at line 58 of file tree_reindex.hpp.

Field Documentation

◆ actual_tree_node

const tree_nodeRef& tree_reindex::actual_tree_node

Represent the actual reference to the tree_node.

NOTE: this has to be a reference since tree_nodeRef at the moment of the construction of this can not ready

Definition at line 74 of file tree_reindex.hpp.

Referenced by visit().

◆ html

bool tree_reindex::html = false
static

Definition at line 76 of file tree_reindex.hpp.

Referenced by print(), and visit().


The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:04:08 for PandA-2024.02 by doxygen 1.8.13