Class FunctionId contains a single entry in a function list (as returned by the FunctionList::get_entry function). The FunctionId object returned contains a string representation of the function name, its mangled name, and its associated source file name.
Synopsis
#include <FunctionId.h> FunctionId(void); FunctionId(const char *source_name, const char *function_name, const char *mangled_name); FunctionId(const FunctionId &oldobj);
Parameters
Description
The default constructor creates an empty FunctionId object.
The standard constructor uses the arguments provided to initialize the object.
The copy constructor uses the values contained in the oldobj to initialize the new (constructed) object.
The constructors provided with this class will return a value of NULL if they are invalid.
Exceptions
See Also
class FunctionList
Synopsis
#include <FunctionId.h> char *get_demangled_name(char *buf, unsigned int len) const;
Parameters
Description
This function copies into the buffer a null-terminated character string representing the demangled name of the function. The name may be truncated if the len parameter is smaller than the length of the demangled name. A function's demangled name is the name of a function as it appears in the original source code of a program as seen by a compiler.
Return Values
Returns a pointer to the buffer, which will contain at most len bytes of the demangled function name. If the FunctionId object is uninitialized, then NULL is returned.
See Also
get_demangled_name_length, get_mangled_name, get_mangled_name_length
Synopsis
#include <FunctionId.h> unsigned int get_demangled_name_length(void) const;
Description
Returns the length, including the null-terminating byte, of the demangled name of the function.
Return Values
The length of the object's demangled name is returned. If the FunctionId object is uninitialized, 0 is returned.
See Also
get_demangled_name, get_mangled_name, get_mangled_name_length
Synopsis
#include <FunctionId.h> char *get_mangled_name(char *buf, unsigned int len) const;
Parameters
Description
This function copies into the buffer a null-terminated character string representing the mangled name of the function. The name may be truncated if the len parameter is smaller than the length of the mangled name. A function's mangled name is the name of a function as it appears to the linker and loader. Name mangling is supported by compilers and linkers to resolve overloaded function names in object-oriented programming languages. In order to distinguish between two functions that have the same programmer-visible name, compilers encode parameter type information into the actual function name as it is seen by the linker and loader. Mangled names include parameter data type information for some languages, notably C++, but not necessarily for all languages.
Return Values
Returns a pointer to the buffer, which will contain at most len bytes of the mangled function name. If the FunctionId object is uninitialized, then NULL is returned.
See Also
get_mangled_name_length, get_demangled_name, get_demangled_name_length
Synopsis
#include <FunctionId.h> unsigned int get_mangled_name(void) const;
Description
Returns the length, including the null-terminating byte, of the mangled name of a function.
Return Values
The length of the object's mangled name is returned. If the FunctionId object is unititialized, 0 is returned.
See Also
get_mangled_name, get_demangled_name, get_demangled_name_length
Synopsis
#include <FunctionId.h> char *get_module_name(char *buf, unsigned int len) const;
Parameters
Description
Copies into the buffer a null-terminated character string representation of the file name and path, if available, of the module that contains the function represented by this FunctionId object. The name may be truncated if the len parameter is smaller than the length of the module name.
Return Values
Returns a pointer to the buffer, which will contain the file name and path, if available, of the module that contains the function represented by this FunctionId object. Returns 0 if the FunctionId object is uninitialized.
See Also
get_module_name_length
Synopsis
#include <FunctionId.h> unsigned int get_module_name_length(void) const;
Description
Returns the length, including the null-terminating byte, of the file name and path, if available, of the module that contains the function represented by this FunctionId object.
Return Values
Returns the length of the file name and path, if available, of the module that contains the function represented by this FunctionId object. Returns 0 if the FunctionId object is uninitialized.
See Also
get_module_name
Synopsis
#include <FunctionId.h> FunctionId & operator=(const FunctionId &rhs);
Parameters
Description
Assigns the value of the right hand operand (existing FunctionId object) to the invoking FunctionId object. The left operand is the invoking object.
For example,
FunctionId rhs, lhs: . . . lhs = rhs;
assigns the value of rhs to lhs. This yields a new copy of the FunctionId object.
Return Values
Returns a reference to the invoking FunctionId object (the left operand).
Synopsis
#include <FunctionId.h> int operator==(const FunctionId& compare);
Parameters
Description
This function compares two FunctionId objects for equivalence. If the two objects represent the same function, this function returns 1. Otherwise it returns 0.
Return Values
This function returns 1 if the two objects are equivalent. Otherwise, it returns 0.