retdec
|
A representation of information about an API call. More...
#include <api_call_info.h>
Public Types | |
using | ParamNum = unsigned |
using | ParamBindMap = std::map< ParamNum, std::string > |
Mapping of a parameter number into a bind ID. More... | |
using | param_bind_iterator = ParamBindMap::const_iterator |
Public Member Functions | |
APICallInfo (std::string funcName) | |
Constructs an API call information for a function named funcName. More... | |
bool | operator== (const APICallInfo &other) const |
Returns true if this info is equal to other, false otherwise. More... | |
bool | operator!= (const APICallInfo &other) const |
Returns true if this info is not equal to other, false otherwise. More... | |
Function Name Accessors | |
const std::string | getFuncName () const |
Returns the name of the function that this API call information describes. More... | |
Return Value Binding | |
APICallInfo & | bindReturnValue (const std::string &bindId) |
Binds bindId to the return value. More... | |
bool | hasBoundReturnValue () const |
Returns true if the return value has been bound to some ID, false otherwise. More... | |
std::string | getReturnValueBind () const |
Returns the ID of the bind to the return value. More... | |
Parameter Binding | |
APICallInfo & | bindParam (ParamNum n, const std::string &bindId) |
Binds bindId to the given parameter. More... | |
bool | hasBoundParam (ParamNum n) const |
Returns true if parameter number n has been bound to some ID, false otherwise. More... | |
std::string | getParamBind (ParamNum n) const |
Returns the ID of the bind to the given parameter. More... | |
param_bind_iterator | param_bind_begin () const |
Returns an iterator to the first parameter bind. More... | |
param_bind_iterator | param_bind_end () const |
Returns an iterator past the last parameter bind. More... | |
Private Attributes | |
std::string | funcName |
Name of the function. More... | |
std::string | returnValueBind |
ID of the bind to the return value. If there is no bind, it is empty. More... | |
ParamBindMap | paramBinds |
A representation of information about an API call.
Use APICallInfoSeq to join serveral information into a sequence.
using retdec::llvmir2hll::APICallInfo::param_bind_iterator = ParamBindMap::const_iterator |
Iterator for iterating over ParamBindMap. Attributes (i
is an iterator):
i->first
is the parameter's number,i->second
is the parameter's bind ID. using retdec::llvmir2hll::APICallInfo::ParamBindMap = std::map<ParamNum, std::string> |
Mapping of a parameter number into a bind ID.
using retdec::llvmir2hll::APICallInfo::ParamNum = unsigned |
Parameter number (the first parameter has number 1, the second has number 2 etc.)
retdec::llvmir2hll::APICallInfo::APICallInfo | ( | std::string | funcName | ) |
Constructs an API call information for a function named funcName.
APICallInfo & retdec::llvmir2hll::APICallInfo::bindParam | ( | ParamNum | n, |
const std::string & | bindId | ||
) |
Binds bindId to the given parameter.
[in] | n | Parameter's number (the first parameter has number 1, the second has number 2 etc.) |
[in] | bindId | ID to be bound to the parameter number n. |
If this function is called several times, the last bind is stored.
n > 0
APICallInfo & retdec::llvmir2hll::APICallInfo::bindReturnValue | ( | const std::string & | bindId | ) |
Binds bindId to the return value.
If this function is called several times, the last bind is stored.
const std::string retdec::llvmir2hll::APICallInfo::getFuncName | ( | ) | const |
Returns the name of the function that this API call information describes.
std::string retdec::llvmir2hll::APICallInfo::getParamBind | ( | ParamNum | n | ) | const |
Returns the ID of the bind to the given parameter.
[in] | n | Parameter's number (the first parameter has number 1, the second has number 2 etc.) |
If the parameter has not been bound to anything, this function returns the empty string.
n > 0
std::string retdec::llvmir2hll::APICallInfo::getReturnValueBind | ( | ) | const |
Returns the ID of the bind to the return value.
bool retdec::llvmir2hll::APICallInfo::hasBoundParam | ( | ParamNum | n | ) | const |
Returns true
if parameter number n has been bound to some ID, false
otherwise.
[in] | n | Parameter's number (the first parameter has number 1, the second has number 2 etc.) |
n > 0
bool retdec::llvmir2hll::APICallInfo::hasBoundReturnValue | ( | ) | const |
Returns true
if the return value has been bound to some ID, false
otherwise.
bool retdec::llvmir2hll::APICallInfo::operator!= | ( | const APICallInfo & | other | ) | const |
Returns true
if this info is not equal to other, false
otherwise.
bool retdec::llvmir2hll::APICallInfo::operator== | ( | const APICallInfo & | other | ) | const |
Returns true
if this info is equal to other, false
otherwise.
APICallInfo::param_bind_iterator retdec::llvmir2hll::APICallInfo::param_bind_begin | ( | ) | const |
Returns an iterator to the first parameter bind.
APICallInfo::param_bind_iterator retdec::llvmir2hll::APICallInfo::param_bind_end | ( | ) | const |
Returns an iterator past the last parameter bind.
|
private |
Name of the function.
|
private |
ID of the binds to parameters (if any). If there are no binds, it is empty.
|
private |
ID of the bind to the return value. If there is no bind, it is empty.