cmil::tInputData< ActionType > Class Template Reference

This is a template wrapper for the InputData class, which provides common concrete functionality to subclasses. More...

#include <InputData.h>

Inheritance diagram for cmil::tInputData< ActionType >:

Inheritance graph
[legend]
Collaboration diagram for cmil::tInputData< ActionType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 tInputData (const std::string &name)
bool isActionCompatible (InputAction *const action) const
virtual void run (InputAction *const action) const

Private Member Functions

virtual void do_run (ActionType *action) const =0

Detailed Description

template<typename ActionType>
class cmil::tInputData< ActionType >

This is a template wrapper for the InputData class, which provides common concrete functionality to subclasses.

Definition at line 104 of file InputData.h.


Constructor & Destructor Documentation

template<typename ActionType>
cmil::tInputData< ActionType >::tInputData ( const std::string &  name  )  [inline]

Definition at line 106 of file InputData.h.

00106 : InputData(name) {} 


Member Function Documentation

template<typename ActionType>
virtual void cmil::tInputData< ActionType >::do_run ( ActionType *  action  )  const [private, pure virtual]

Referenced by cmil::tInputData< cmil::ModAction >::run().

Here is the caller graph for this function:

template<typename ActionType>
bool cmil::tInputData< ActionType >::isActionCompatible ( InputAction *const   action  )  const [inline, virtual]

Implements cmil::InputData.

Definition at line 108 of file InputData.h.

00108                                                                {
00109         log_debug( std::string("template isActionCompatible() typeid(*action).name() : ")
00110             .append(typeid(*action).name()));
00111 
00112         if(action) {
00113             log_debug( "template isActionCompatible() running cast test" );
00114           if(dynamic_cast<ActionType*>(action) != 0) {
00115             log_debug( "template isActionCompatible() finished cast test" );
00116             return true;
00117           }
00118         }
00119 
00120         log_debug( "template isActionCompatible() returning false" );
00121         return false;
00122       }

template<typename ActionType>
virtual void cmil::tInputData< ActionType >::run ( InputAction *const   action  )  const [inline, virtual]

Implements cmil::InputData.

Definition at line 124 of file InputData.h.

Referenced by cmil::NodeSequencer::capture(), cmil::NormalHandler::handle(), and cmil::NormalHandler::HandleActivity().

00124                                                         {
00125         ActionType* tmp_action_type;
00126 
00127         if(action) {
00128           if((tmp_action_type = dynamic_cast<ActionType*> (action)) != 0) {
00129             do_run(tmp_action_type);
00130           }
00131           else 
00132             log_debug("run()  unable to run action due to incompatible action type. " );
00133         }
00134         else  
00135           log_error("run() called on a null action");
00136       }

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
(c) 2006-2007 John P. Feltz
Generated on Wed Jul 25 16:08:02 2007 for Common Media Input Layer by doxygen 1.4.7

SourceForge.net Logo