Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WctlBase< Subclass > Class Template Reference

#include <windowcontroller.h>

Inheritance diagram for WctlBase< Subclass >:
WindowController

Public Types

typedef
WindowControllerTableEntry
< Subclass > 
WctlTableEntry
 

Public Member Functions

virtual bool processWindowCommand (const EventCommandId &command, Control *control)
 
- Public Member Functions inherited from WindowController
virtual void init (void)=0
 
virtual void run (void)
 
virtual void draw (void)
 
virtual Windowwindow (void)
 
virtual void setWindow (Window *w)
 
 WindowController ()
 
virtual ~WindowController (void)
 

Static Protected Attributes

static const WctlTableEntry WctlCommandTable []
 

Additional Inherited Members

- Protected Attributes inherited from WindowController
Windowm_window
 
bool m_deleteOnWindowClose
 

Detailed Description

template<class Subclass>
class WctlBase< Subclass >

Definition at line 87 of file windowcontroller.h.

Member Typedef Documentation

template<class Subclass>
typedef WindowControllerTableEntry< Subclass > WctlBase< Subclass >::WctlTableEntry

Definition at line 90 of file windowcontroller.h.

Member Function Documentation

template<class Subclass>
virtual bool WctlBase< Subclass >::processWindowCommand ( const EventCommandId command,
Control control 
)
inlinevirtual

Reimplemented from WindowController.

Definition at line 92 of file windowcontroller.h.

93  {
94  //Iterate through the dispatch table.
95  for (const WctlTableEntry *p = &WctlCommandTable[0]; p->function; p++)
96  if (p->command == command)
97  if ( p->controlId.size() == 0 || p->controlId == control->id() )
98  //Found a handler for the command.
99  return ( ( static_cast< Subclass* > (this) )->*(p->function) )( command, control );
100  //Let the base class have a try at the command first.
101  if ( WindowController::processWindowCommand( command, control ) )
102  return true;
103  //Didn't find a handler.
104  return false;
105  }

Member Data Documentation

template<class Subclass>
const WctlTableEntry WctlBase< Subclass >::WctlCommandTable[]
staticprotected

Definition at line 109 of file windowcontroller.h.

Referenced by WctlBase< BaseComputer >::processWindowCommand().


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