Function Exit Pointcut Functions

Functions

struct aop_pointcutaop_match_function_exit ()
void aop_filter_exit_by_return_type (struct aop_pointcut *pc, const struct aop_type *type)
struct aop_dynvalaop_capture_exit_return_value (struct aop_joinpoint *jp)
struct aop_dynvalaop_capture_exit_return_value_by_type (struct aop_joinpoint *jp, const struct aop_type *type)

Function Documentation

struct aop_dynval* aop_capture_exit_return_value ( struct aop_joinpoint jp  )  [read]

Get a dynval representing the value returned at a function exit join point. Note that you must filter with aop_filter_exit_by_return_type() in order to capture the return value using aop_capture_exit_return_value().

Parameters:
jp A function exit join point. Function exit join points are obtained by joining on an aop_match_function_exit() pointcut.
Returns:
A dynval with its type determined by aop_filter_exit_by_return_type().
struct aop_dynval* aop_capture_exit_return_value_by_type ( struct aop_joinpoint jp,
const struct aop_type type 
) [read]

Get a dynval representing the value returned at a function exit join point if the function's return value matches the specified type. This function makes it possible to capture the return value from an exit join point even if you have not filtered it with aop_filter_exit_by_return_type(). However, it returns NULL if the return value does not match the specified type.

Parameters:
jp A function exit join point. Function exit join points are obtained by joining on an aop_match_function_exit() pointcut.
type This function verifies that the return value's type matches the specified type.
Returns:
A dynval with its type determined by the specified type or NULL if the return value does not match the specified type.
void aop_filter_exit_by_return_type ( struct aop_pointcut pc,
const struct aop_type type 
)

Filter a function exit pointcut by the function's return type. This is an all-or-nothing filter: because all the function's return statements will have the same type, either all of the exit join points will be filtered out or none will.

Note that you must filter a pointcut by return type in order to call aop_capture_exit_return_value() on any of its join points.

Parameters:
pc The function exit pointcut to filter. Function exit pointcuts are created with aop_match_function_exit().
type The return type to filter by.
struct aop_pointcut* aop_match_function_exit (  )  [read]

Get a pointcut matching exit points in the current function, which include explicit return statements and the implicit exit at the end of the function.

Returns:
The resulting pointcut.
Examples:
duplicate.c.
Generated on Tue Jul 31 21:46:42 2012 for InterAspect by doxygen 1.6.1