pcp's templated bound member functions. More...
#include <vgui_command.h>
Public Types | |
typedef void(receiver::* | action )() |
Public Member Functions | |
vgui_command_simple (receiver *o, action m) | |
void | execute () |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Public Attributes | |
receiver * | obj |
action | mem |
pcp's templated bound member functions.
All methods are inline, so we don't need a separate .cxx file.
vgui_command_simple is a convenient way to build vgui_commands from object/method pairs where the method is of the form void receiver::method(); So, if you have
class myclass { void do_thing(); }; myclass* my_app;
You can make a command such as vgui_command_simple<myclass>(my_app, myclass::do_thing); and pass it to a menu.
Definition at line 73 of file vgui_command.h.
typedef void(receiver::* vgui_command_simple< receiver >::action)() |
Definition at line 75 of file vgui_command.h.
vgui_command_simple< receiver >::vgui_command_simple | ( | receiver * | o, |
action | m | ||
) | [inline] |
Definition at line 77 of file vgui_command.h.
void vgui_command_simple< receiver >::execute | ( | ) | [inline, virtual] |
Implements vgui_command.
Definition at line 78 of file vgui_command.h.
action vgui_command_simple< receiver >::mem |
Definition at line 81 of file vgui_command.h.
receiver* vgui_command_simple< receiver >::obj |
Definition at line 80 of file vgui_command.h.