AALanguage
The best language for those who have nothing to do
Loading...
Searching...
No Matches
Function Struct Reference

A class to represent a function in semantic. More...

#include <TableIdentifiers.h>

Collaboration diagram for Function:

Public Member Functions

 Function (std::string name_, Type type_, TableIdentifiers *tid_, std::vector< Type > identifiers_, std::vector< int > params_init_, std::vector< Identifier * > params_ptrs_, int ptr_, int not_default_pref_=0)
 A constructor that specifies the public fields of the type.
 
bool operator== (const Function &f) const
 Type comparison operator.
 

Public Attributes

std::string name
 Function name.
 
int not_default_pref = 0
 Function parameter prefix without default value.
 
Type type
 Return type of the function.
 
std::vector< Typeidentifiers
 Identifiers types for function parameters.
 
std::vector< int > params_init
 Initialization addresses of each parameter in the internal program view.
 
std::vector< Identifier * > params_ptrs
 A vector-array of pointers to the Identifier of each argument.
 
int ptr
 Offset address of the function header in the internal program representation.
 
TableIdentifiersTID
 Function TID pointer.
 

Detailed Description

A class to represent a function in semantic.

Definition at line 145 of file TableIdentifiers.h.

Constructor & Destructor Documentation

◆ Function()

Function::Function ( std::string name_,
Type type_,
TableIdentifiers * tid_,
std::vector< Type > identifiers_,
std::vector< int > params_init_,
std::vector< Identifier * > params_ptrs_,
int ptr_,
int not_default_pref_ = 0 )
inline

A constructor that specifies the public fields of the type.

Definition at line 165 of file TableIdentifiers.h.

References identifiers, name, not_default_pref, params_init, params_ptrs, ptr, TID, and type.

Member Function Documentation

◆ operator==()

bool Function::operator== ( const Function & f) const
inline

Type comparison operator.

Compares the names of functions and the types of all their parameters..

Parameters
otherAnother function to compare

Definition at line 183 of file TableIdentifiers.h.

References identifiers, and name.

Member Data Documentation

◆ identifiers

std::vector<Type> Function::identifiers

Identifiers types for function parameters.

Definition at line 153 of file TableIdentifiers.h.

Referenced by Function(), FunctionHasher::operator()(), and operator==().

◆ name

std::string Function::name

◆ not_default_pref

int Function::not_default_pref = 0

Function parameter prefix without default value.

Definition at line 149 of file TableIdentifiers.h.

Referenced by Function().

◆ params_init

std::vector<int> Function::params_init

Initialization addresses of each parameter in the internal program view.

Definition at line 155 of file TableIdentifiers.h.

Referenced by Poliz::call_function(), and Function().

◆ params_ptrs

std::vector<Identifier*> Function::params_ptrs

A vector-array of pointers to the Identifier of each argument.

Definition at line 157 of file TableIdentifiers.h.

Referenced by Poliz::call_function(), and Function().

◆ ptr

int Function::ptr

Offset address of the function header in the internal program representation.

Definition at line 159 of file TableIdentifiers.h.

Referenced by Poliz::call_function(), Poliz::execute(), and Function().

◆ TID

TableIdentifiers* Function::TID

Function TID pointer.

Definition at line 161 of file TableIdentifiers.h.

Referenced by Poliz::call_function(), Poliz::execute(), and Function().

◆ type

Type Function::type

Return type of the function.

Definition at line 151 of file TableIdentifiers.h.

Referenced by Poliz::execute(), and Function().


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