cmil::System Class Reference

#include <System.h>

Inheritance diagram for cmil::System:

Inheritance graph
[legend]
Collaboration diagram for cmil::System:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 System (InputArbitrator *const arb)
 System ()
virtual ~System ()
virtual void attach (InputActor *actor)
virtual std::string getName () const
virtual void poll ()
 This is an expensive polling operation.

Protected Member Functions

virtual const bool isActionCompatible (int id, InputAction *action) const
virtual const int getID (const Ev &event) const
virtual InputData *const getData (int id) const
virtual InputData *const getData (const Ev &event) const
virtual int getSize () const
virtual void quit ()
virtual void registerDevices (DeviceRegistry &dev)
virtual void update (const InputData &input)
virtual void update (const ModData &input)

Protected Attributes

TranslatorRegistry m_translators

Private Attributes

InputArbitrator *const m_arbitrator

Friends

class SystemClient

Detailed Description

These goals are met via usage of translator(s), an arbitrator, and InputActor(observers). Communication between these components are done using the InputData class and it's derivatives.

Definition at line 87 of file System.h.


Constructor & Destructor Documentation

cmil::System::System ( InputArbitrator *const   arb  ) 

Definition at line 65 of file System.cpp.

00065 : m_arbitrator(arb) {}; 

cmil::System::System (  ) 

Definition at line 64 of file System.cpp.

00064 : m_arbitrator(new InputArbitrator()) {}; 

virtual cmil::System::~System (  )  [inline, virtual]

Definition at line 92 of file System.h.

References Logger::log_debug(), and m_arbitrator.

00092                         {
00093         log_debug("dtor");
00094 
00095         if(m_arbitrator) {
00096           log_debug("deleting arbitrator");
00097           delete m_arbitrator;
00098         }
00099       }

Here is the call graph for this function:


Member Function Documentation

void cmil::System::attach ( InputActor actor  )  [virtual]

Definition at line 67 of file System.cpp.

References cmil::InputArbitrator::attach(), and m_arbitrator.

00067                                              {
00068     m_arbitrator->attach(actor);
00069   }

Here is the call graph for this function:

InputData *const cmil::System::getData ( const Ev event  )  const [protected, virtual]

Definition at line 87 of file System.cpp.

References cmil::InputArbitrator::getData(), and m_arbitrator.

00087                                                         {
00088     return m_arbitrator->getData(event);
00089   }; 

Here is the call graph for this function:

InputData *const cmil::System::getData ( int  id  )  const [protected, virtual]

Definition at line 83 of file System.cpp.

References cmil::InputArbitrator::getData(), and m_arbitrator.

Referenced by cmil::SystemClient::getData().

00083                                                {
00084     return m_arbitrator->getData(id);
00085   };

Here is the call graph for this function:

Here is the caller graph for this function:

const int cmil::System::getID ( const Ev event  )  const [protected, virtual]

Definition at line 79 of file System.cpp.

References cmil::InputArbitrator::getID(), and m_arbitrator.

Referenced by cmil::SystemClient::getID().

00079                                                {
00080     return m_arbitrator->getID(event);
00081   };

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::string cmil::System::getName (  )  const [inline, virtual]

Implements Logger.

Reimplemented in cmil::SDL::SDLSystem.

Definition at line 103 of file System.h.

00103                                         {
00104         return "System";
00105       }

int cmil::System::getSize (  )  const [protected, virtual]

Definition at line 91 of file System.cpp.

References cmil::InputArbitrator::getSize(), and m_arbitrator.

Referenced by cmil::SystemClient::getSize().

00091                             {
00092     return m_arbitrator->getSize();
00093   };

Here is the call graph for this function:

Here is the caller graph for this function:

const bool cmil::System::isActionCompatible ( int  id,
InputAction action 
) const [protected, virtual]

Definition at line 75 of file System.cpp.

References cmil::InputArbitrator::isActionCompatible(), and m_arbitrator.

Referenced by cmil::SystemClient::isActionCompatible().

00075                                                                          {
00076     return m_arbitrator->isActionCompatible(id, action);
00077   };

Here is the call graph for this function:

Here is the caller graph for this function:

void cmil::System::poll (  )  [virtual]

This is an expensive polling operation.

Reimplemented in cmil::SDL::SDLSystem.

Definition at line 71 of file System.cpp.

References m_translators, and cmil::TranslatorRegistry::poll().

Referenced by Application::run().

00071                     {
00072     m_translators.poll();
00073   }

Here is the call graph for this function:

Here is the caller graph for this function:

void cmil::System::quit (  )  [protected, virtual]

Definition at line 95 of file System.cpp.

References m_arbitrator, and cmil::InputArbitrator::quit().

Referenced by cmil::SystemClient::quit().

00095                     {
00096     return m_arbitrator->quit();
00097   }

Here is the call graph for this function:

Here is the caller graph for this function:

void cmil::System::registerDevices ( DeviceRegistry dev  )  [protected, virtual]

Definition at line 99 of file System.cpp.

References m_arbitrator, and cmil::InputArbitrator::registerDevices().

Referenced by cmil::SDL::SDLSystem::init(), and cmil::SystemClient::registerDevices().

00099                                                   { 
00100     m_arbitrator->registerDevices(dev);
00101   }  

Here is the call graph for this function:

Here is the caller graph for this function:

void cmil::System::update ( const ModData input  )  [protected, virtual]

Definition at line 107 of file System.cpp.

References m_arbitrator, and cmil::InputArbitrator::update().

00107                                           {
00108     m_arbitrator->update(input);
00109   }

Here is the call graph for this function:

void cmil::System::update ( const InputData input  )  [protected, virtual]

Definition at line 103 of file System.cpp.

References m_arbitrator, and cmil::InputArbitrator::update().

Referenced by cmil::SystemClient::update().

00103                                             {
00104     m_arbitrator->update(input);
00105   }

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class SystemClient [friend]

Definition at line 111 of file System.h.


Member Data Documentation

InputArbitrator* const cmil::System::m_arbitrator [private]

Definition at line 129 of file System.h.

Referenced by attach(), getData(), getID(), getSize(), isActionCompatible(), quit(), registerDevices(), update(), and ~System().

TranslatorRegistry cmil::System::m_translators [protected]

Definition at line 126 of file System.h.

Referenced by cmil::SDL::SDLSystem::init(), and poll().


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

SourceForge.net Logo