Skip to content

FP

API for managing Function Pointers

詳細情報

メンバー

c_callback

Footprint for a global function

retT(* FP< retT, argT >::c_callback) (argT)

method_callback

Footprint for a member function

retT(FPtrDummy::* FP< retT, argT >::method_callback) (argT)

FP()

Create the object - only one callback can be attached to the object, that is a member function or a global function, not both at the same time

FP< retT, argT >::FP()

attach()

void FP< retT, argT >::attach(T *item, retT(T::*method)(argT))

引数

  • T * item - Address of the initialized object
  • retT(T::*)(argT) method

attach()

void FP< retT, argT >::attach(retT(*function)(argT))

引数

  • retT(*)(argT) function - The address of a globally defined function

operator()()

retT FP< retT, argT >::operator()(argT arg) const

引数

  • argT arg - An argument that is passed into the function handler that is called

戻り値

retT The return from the function hanlder called by this class

attached()

Determine if an callback is currently hooked

bool FP< retT, argT >::attached()

戻り値

bool 1 if a method is hooked, 0 otherwise

detach()

Release a function from the callback hook

void FP< retT, argT >::detach()