PandA-2024.02
Public Types | Public Member Functions | Private Attributes
FunctionExpander Class Reference

used to avoid expansion of c library function or type More...

#include <tree_helper.hpp>

Collaboration diagram for FunctionExpander:
Collaboration graph
[legend]

Public Types

enum  serialization { none, internal, total }
 Specify the type of serialization that a function must have. More...
 

Public Member Functions

serialization get_serialization (const std::string &name) const
 Return which type of serialization the given function must have. More...
 
bool is_transparent (const std::string &name) const
 Return if function has to be considered transparent even if we haven't body. More...
 
void check_lib_type (const tree_nodeRef &var)
 Check if variable is defined in a c system library header; if yes adds its type to library type. More...
 
virtual bool operator() (const tree_nodeRef &t) const
 check membership to c library function More...
 
 FunctionExpander ()
 Constructor. More...
 
virtual ~FunctionExpander ()=default
 Destructor. More...
 

Private Attributes

CustomOrderedSet< std::string > no_serialize
 Set of functions which don't need serialization. More...
 
CustomOrderedSet< std::string > internal_serialize
 Set of functions which need only internal serialization. More...
 
CustomOrderedSet< std::string > transparent
 Set of not opaque functions. More...
 
CustomOrderedSet< std::string > headers
 Set of headers file containg standard and system types. More...
 
CustomOrderedSet< tree_nodeReflib_types
 Set of types which are in c system library. More...
 

Detailed Description

used to avoid expansion of c library function or type

Definition at line 1357 of file tree_helper.hpp.

Member Enumeration Documentation

◆ serialization

Specify the type of serialization that a function must have.

Enumerator
none 

No serialization.

internal 

Serialization between call of the same function.

total 

Serialization between call of all funcions.

Definition at line 1379 of file tree_helper.hpp.

Constructor & Destructor Documentation

◆ FunctionExpander()

FunctionExpander::FunctionExpander ( )

Constructor.

Definition at line 6150 of file tree_helper.cpp.

◆ ~FunctionExpander()

virtual FunctionExpander::~FunctionExpander ( )
virtualdefault

Destructor.

Member Function Documentation

◆ check_lib_type()

void FunctionExpander::check_lib_type ( const tree_nodeRef var)

Check if variable is defined in a c system library header; if yes adds its type to library type.

Parameters
varis the node of the variable

Definition at line 6073 of file tree_helper.cpp.

References tree_node::get_kind(), GET_NODE, and THROW_ASSERT.

Here is the call graph for this function:

◆ get_serialization()

FunctionExpander::serialization FunctionExpander::get_serialization ( const std::string &  name) const

Return which type of serialization the given function must have.

Parameters
nameis the name of the function
Returns
the type of serialization

Definition at line 6055 of file tree_helper.cpp.

◆ is_transparent()

bool FunctionExpander::is_transparent ( const std::string &  name) const

Return if function has to be considered transparent even if we haven't body.

Parameters
nameis the name of the function
Returns
if the function is transparent

Definition at line 6068 of file tree_helper.cpp.

◆ operator()()

bool FunctionExpander::operator() ( const tree_nodeRef t) const
virtual

check membership to c library function

Parameters
tis the treenode of the type
Returns
true if t is a c library function type

Definition at line 6105 of file tree_helper.cpp.

References tree_node::get_kind(), GET_NODE, THROW_ASSERT, and test_panda::type.

Here is the call graph for this function:

Field Documentation

◆ headers

CustomOrderedSet<std::string> FunctionExpander::headers
private

Set of headers file containg standard and system types.

Definition at line 1370 of file tree_helper.hpp.

◆ internal_serialize

CustomOrderedSet<std::string> FunctionExpander::internal_serialize
private

Set of functions which need only internal serialization.

Definition at line 1364 of file tree_helper.hpp.

◆ lib_types

CustomOrderedSet<tree_nodeRef> FunctionExpander::lib_types
private

Set of types which are in c system library.

Definition at line 1373 of file tree_helper.hpp.

◆ no_serialize

CustomOrderedSet<std::string> FunctionExpander::no_serialize
private

Set of functions which don't need serialization.

Definition at line 1361 of file tree_helper.hpp.

◆ transparent

CustomOrderedSet<std::string> FunctionExpander::transparent
private

Set of not opaque functions.

Definition at line 1367 of file tree_helper.hpp.


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

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