winIDEA SDK
Loading...
Searching...
No Matches
isys::CFunction Class Reference

Description

This immutable class contains information about function.

#include <CDataController.h>

Public Member Functions

 CFunction (const std::string &name, const std::string &qualifiedName, const std::string &scope, const std::string &returnType, int moduleIndex, const VariableVector &parameters, const VariableVector &locals, iconnect::AddressVector &callsTo, iconnect::AddressVector &callsFrom)
 Instantiates object.
 
void getCallsFromFunction (iconnect::AddressVector &functionAddresses)
 Returns addresses of functions, which are called from this function.
 
void getCallsToFunction (iconnect::AddressVector &functionAddresses)
 Returns addresses, where calls to this function are located.
 
VariableVector getLocalVars () const
 Returns function local variables (including parameters).
 
int getModuleIndex () const
 Returns index of the source file, where this function is implemented.
 
std::string getName () const
 Returns function name without any qualifiers like scope or parameters.
 
VariableVector getParameters () const
 Returns function parameters.
 
std::string getQualifiedName () const
 Returns function name.
 
std::string getReturnType () const
 Returns function's return type.
 
std::string getScope () const
 Returns function scope, for example class name.
 

Constructor & Destructor Documentation

◆ CFunction()

isys::CFunction::CFunction ( const std::string & name,
const std::string & qualifiedName,
const std::string & scope,
const std::string & returnType,
int moduleIndex,
const VariableVector & parameters,
const VariableVector & locals,
iconnect::AddressVector & callsTo,
iconnect::AddressVector & callsFrom )
inline

Instantiates object.

Constructor is not intended to be used by clients.

Member Function Documentation

◆ getCallsFromFunction()

void isys::CFunction::getCallsFromFunction ( iconnect::AddressVector & functionAddresses)
inline

Returns addresses of functions, which are called from this function.

If some function is called from more than one location in this function, then its address appears more than once in functionAddresses.

See also
isys::CAddressController::getFunctionNames()

Python example: call_hierarchy.py

◆ getCallsToFunction()

void isys::CFunction::getCallsToFunction ( iconnect::AddressVector & functionAddresses)
inline

Returns addresses, where calls to this function are located.

See also
isys::CAddressController::getFunctionNames()

Python example: call_hierarchy.py

◆ getModuleIndex()

int isys::CFunction::getModuleIndex ( ) const
inline

Returns index of the source file, where this function is implemented.

The index can be used to get module from the list of modules returned by method CDataController::getModules().

◆ getQualifiedName()

std::string isys::CFunction::getQualifiedName ( ) const
inline

Returns function name.

This name may not be fully qualified, but depends on setting in winiDEA (for example just enough decorated to be unique).