Aseba::Player Class Reference
[Message replayer]

Inheritance diagram for Aseba::Player:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Player (const char *inputFile, bool respectTimings, int speedFactor)
void sendLine ()
StringList tokenize (const string &input)

Protected Member Functions

void connectionClosed (Stream *stream, bool abnormal)
void connectionCreated (Stream *stream)
void incomingData (Stream *stream)

Private Types

typedef deque< string > StringList

Private Attributes

Streamin
UnifiedTime lastEventTime
UnifiedTime lastTimeStamp
string line
bool respectTimings
int speedFactor

Detailed Description

A message player This class replay saved user messages

Definition at line 45 of file play.cpp.


Member Typedef Documentation

typedef deque<string> Aseba::Player::StringList [private]

Definition at line 48 of file play.cpp.


Constructor & Destructor Documentation

Aseba::Player::Player ( const char *  inputFile,
bool  respectTimings,
int  speedFactor 
) [inline]

Definition at line 58 of file play.cpp.


Member Function Documentation

void Aseba::Player::connectionClosed ( Stream ,
bool   
) [inline, protected, virtual]

Called when target closes connection. The only valid method to call on the stream is getTargetName(), input/output operations are forbidden. You must not call closeStream(stream) from within this method for the same stream as the one passed as parameter. Subclass can implement this method. Called with the stream lock held.

Parameters:
stream stream to the target.
abnormal whether the connection was closed during step (abnormal == false) or when an operation was performed (abnormal == true)

Reimplemented from Aseba::Hub.

Definition at line 165 of file play.cpp.

void Aseba::Player::connectionCreated ( Stream  )  [inline, protected, virtual]

Called when any data connection is created. It is not called when a listening connection (eg tcpin:) is created. If the stream is closed during this method, an exception occurs: the caller is responsible to handle it. The stream is already inserted in the stream list when this function is called. Subclass can implement this method. Called with the stream lock held.

Parameters:
stream stream to the target

Reimplemented from Aseba::Hub.

Definition at line 148 of file play.cpp.

void Aseba::Player::incomingData ( Stream  )  [inline, protected, virtual]

Called when data is available for reading on the stream. If the stream is closed during this method, an exception occurs: Hub stops the execution of this method and calls connectionClosed(); objects dynamically allocated must thus be handled with auto_ptr. If step() is used, subclass must implement this method and call read at least once. Called with the stream lock held.

Parameters:
stream stream to the target

Reimplemented from Aseba::Hub.

Definition at line 153 of file play.cpp.

void Aseba::Player::sendLine (  )  [inline]

Definition at line 91 of file play.cpp.

StringList Aseba::Player::tokenize ( const string &  input  )  [inline]

Definition at line 69 of file play.cpp.


Member Data Documentation

Definition at line 52 of file play.cpp.

Definition at line 55 of file play.cpp.

Definition at line 54 of file play.cpp.

string Aseba::Player::line [private]

Definition at line 53 of file play.cpp.

Definition at line 50 of file play.cpp.

Definition at line 51 of file play.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:15 2011