Public Types | Public Member Functions | Public Attributes
vgui_command_simple< receiver > Struct Template Reference

pcp's templated bound member functions. More...

#include <vgui_command.h>

Inheritance diagram for vgui_command_simple< receiver >:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

template<class receiver>
struct vgui_command_simple< receiver >

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.


Member Typedef Documentation

template<class receiver >
typedef void(receiver::* vgui_command_simple< receiver >::action)()

Definition at line 75 of file vgui_command.h.


Constructor & Destructor Documentation

template<class receiver >
vgui_command_simple< receiver >::vgui_command_simple ( receiver *  o,
action  m 
) [inline]

Definition at line 77 of file vgui_command.h.


Member Function Documentation

template<class receiver >
void vgui_command_simple< receiver >::execute ( ) [inline, virtual]

Implements vgui_command.

Definition at line 78 of file vgui_command.h.


Member Data Documentation

template<class receiver >
action vgui_command_simple< receiver >::mem

Definition at line 81 of file vgui_command.h.

template<class receiver >
receiver* vgui_command_simple< receiver >::obj

Definition at line 80 of file vgui_command.h.


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