FastUIDraw
Classes | Public Member Functions | List of all members
fastuidraw::APICallbackSet Class Reference

#include <api_callback.hpp>

Inheritance diagram for fastuidraw::APICallbackSet:
Inheritance graph
[legend]

Classes

class  CallBack
 

Public Member Functions

 APICallbackSet (c_string label)
 
void call_unloadable_function (c_string fname)
 
void * get_proc (c_string function)
 
void get_proc_function (void *(*get_proc)(c_string))
 
void get_proc_function (void *datum, void *(*get_proc)(void *, c_string))
 
c_string label (void) const
 
void message (c_string message, c_string src_file, int src_line)
 
void post_call (c_string call_string_values, c_string call_string_src, c_string function_name, c_string error_string, void *function_ptr, c_string src_file, int src_line)
 
void pre_call (c_string call_string_values, c_string call_string_src, c_string function_name, void *function_ptr, c_string src_file, int src_line)
 

Detailed Description

An APICallbackSet represents a collection of functors to be called before and after each function call from a collection of functions. This class is used by the fastuidraw::gl_binding and can be reused for other 3D API's (by definding a macro for each 3D API function that pre-calls to APICallbackSet::pre_call() and post- calls to APICallbackSet::post_call() around each 3D API function call.

Definition at line 37 of file api_callback.hpp.

Constructor & Destructor Documentation

◆ APICallbackSet()

fastuidraw::APICallbackSet::APICallbackSet ( c_string  label)
explicit

Ctor.

Parameters
labellabel with which to identify the APICallbackSet, string is copied.

Member Function Documentation

◆ call_unloadable_function()

void fastuidraw::APICallbackSet::call_unloadable_function ( c_string  fname)

To be called by an implementation when attempting to call a function whose function pointer is null

◆ get_proc()

void* fastuidraw::APICallbackSet::get_proc ( c_string  function)

Fetches a function using the function fetcher passed to get_proc_function().

Parameters
functionname of function to fetch

◆ get_proc_function() [1/2]

void fastuidraw::APICallbackSet::get_proc_function ( void *(*)(c_string get_proc)

Sets the function that the system uses to fetch the function pointers.

Parameters
get_procvalue to use, default is nullptr.

◆ get_proc_function() [2/2]

void fastuidraw::APICallbackSet::get_proc_function ( void *  datum,
void *(*)(void *, c_string get_proc 
)

Sets the function that the system uses to fetch the function pointers.

Parameters
datumclient data pointer passed to function
get_procvalue to use, default is nullptr.

◆ label()

c_string fastuidraw::APICallbackSet::label ( void  ) const

Return the label passed in the ctor.

◆ message()

void fastuidraw::APICallbackSet::message ( c_string  message,
c_string  src_file,
int  src_line 
)

To be called by an implementation to emit a message to each of the callbacks.

◆ post_call()

void fastuidraw::APICallbackSet::post_call ( c_string  call_string_values,
c_string  call_string_src,
c_string  function_name,
c_string  error_string,
void *  function_ptr,
c_string  src_file,
int  src_line 
)

To be called by an impementation after issuing a function call.

◆ pre_call()

void fastuidraw::APICallbackSet::pre_call ( c_string  call_string_values,
c_string  call_string_src,
c_string  function_name,
void *  function_ptr,
c_string  src_file,
int  src_line 
)

To be called by an implementation before issuing a function call.


The documentation for this class was generated from the following file: