Core Class Reference

Inheritance diagram for Core:

Inheritance graph
[legend]
Collaboration diagram for Core:

Collaboration graph
[legend]

List of all members.


Detailed Description

implementation of core

Definition at line 52 of file core.cc.


Public Member Functions

 Core (IWriter *)
virtual ~Core ()
virtual bool hasError () const
virtual bool dispatch (const Token &)
virtual IEnviromentGetEnviroment ()
virtual TrilobotGetTrilobot ()
virtual void Export (std::ostream &output)
virtual void Import (std::istream &input)

Private Attributes

IWriterwriter_
bool hasError_
unsigned whiskMask
unsigned distance
World m_world
CoreExporter m_export
Trilobot m_robot

Constructor & Destructor Documentation

Core ( IWriter writer  ) 

Definition at line 95 of file core.cc.

References distance, and whiskMask.

~Core (  )  [virtual]

Definition at line 107 of file core.cc.


Member Function Documentation

virtual bool hasError (  )  const [inline, virtual]

Return true if any error was detected.

Implements IErrorSensitive.

Definition at line 57 of file core.cc.

References hasError_.

bool dispatch ( const Token  )  [virtual]

dispatch request

Returns:
False value shoot down whole simulator. Do not return false on recoverable errors as IErrorSensitive::hasError method is the way to go in such cases.

Implements IListener.

Definition at line 112 of file core.cc.

References ICommand::Answer(), Token::args, distance, ET_CMD_PG, ET_CMD_PH, ET_CMD_PL, ET_CMD_PM, ET_CMD_PN, ET_CMD_PS, ET_CMD_PW, ET_GET_BATT_VOLTAGE, ET_GET_BUTTONS, ET_GET_COMPASS_HEADING, ET_GET_ENCODER_COUNTS, ET_GET_LIGHT_LEVEL, ET_GET_PIR, ET_GET_SONAR, ET_GET_SOUND_LEVEL, ET_GET_SW_VERSION, ET_GET_TEMP, ET_GET_TILT, ET_GET_WATER, ET_GET_WHISKER_STATUS, IComponent::Handle(), ICommand::Handled(), m_robot, IObject::Position(), Token::type, whiskMask, IWriter::writeAck(), IWriter::writeByte(), writer_, and IWriter::writeWord().

Here is the call graph for this function:

virtual IEnviroment& GetEnviroment (  )  [inline, virtual]

Implements ICore.

Definition at line 59 of file core.cc.

References World::Enviroment(), and m_world.

Here is the call graph for this function:

virtual Trilobot& GetTrilobot (  )  [inline, virtual]

Implements ICore.

Definition at line 60 of file core.cc.

References m_robot.

virtual void Export ( std::ostream &  output  )  [inline, virtual]

Implements ICanExportImport.

Definition at line 61 of file core.cc.

References m_robot, and IObject::Serialize().

Here is the call graph for this function:

virtual void Import ( std::istream &  input  )  [inline, virtual]

Implements ICanExportImport.

Definition at line 62 of file core.cc.

References IObject::Deserialize(), and m_robot.

Here is the call graph for this function:


Member Data Documentation

IWriter* writer_ [private]

Definition at line 65 of file core.cc.

Referenced by dispatch().

bool hasError_ [private]

Definition at line 66 of file core.cc.

Referenced by hasError().

unsigned whiskMask [private]

Definition at line 69 of file core.cc.

Referenced by Core(), and dispatch().

unsigned distance [private]

Definition at line 70 of file core.cc.

Referenced by Core(), and dispatch().

World m_world [private]

Definition at line 72 of file core.cc.

Referenced by GetEnviroment().

CoreExporter m_export [private]

Definition at line 73 of file core.cc.

Trilobot m_robot [private]

Definition at line 74 of file core.cc.

Referenced by dispatch(), Export(), GetTrilobot(), and Import().


The documentation for this class was generated from the following file:
Generated on Fri Jul 10 22:42:10 2009 for rob08 by  doxygen 1.5.4