Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
MAKLogger::DtLgrPlaybackDriver Class Reference

The class responsible for controlling the logger playback functionality. More...

+ Inheritance diagram for MAKLogger::DtLgrPlaybackDriver:
+ Collaboration diagram for MAKLogger::DtLgrPlaybackDriver:

List of all members.

Public Types

typedef DtLgrPlaybackCommandFactory Factory
typedef DtLgrPlaybackInterface Interface

Public Member Functions

virtual void tick ()
 Tick the driver, cause it to do anything on a regular basis.
virtual bool getPipeline ()
 Attempt to acquire the pipeline.
virtual bool hasPipeline () const
 Does this object own the pipeline.
virtual bool releasePipeline ()
 Attempt to release the pipeline.
virtual void setUnsavedFile (const DtString &filename, bool selectAll)
 Set the lgrPlayback driver to use an unsaved file (while still using the filename of the original.
virtual void openVirtualFile (const DtString &actualFileName, const DtString &desiredName)
 Open an actual file name, under a desired name.
virtual void configurePipeline ()
 Configure pipeline for playback from file to simulation.
virtual bool isFileSaved () const
 Get whether the file is currently saved.
virtual bool isFileOpen () const
 Get whether a file is opened.
virtual bool isPlaying () const
 Get whether playback is started.
virtual bool isStopped () const
 Get whether playback is stopped.
virtual bool isPaused () const
 Get whether playback is paused.
virtual bool isFileIncomplete () const
 Get whether a file is opened but incomplete.
virtual double playbackSpeed () const
 Get the playback speed.
virtual bool skippingPlayback () const
 Get the skipping playback flag.
virtual double skippingPlaybackThreshold () const
 Get the skipping playback threshold.
virtual DtAbsoluteTime currentTime () const
 Get the current time of playback.
virtual DtAbsoluteTime startTime () const
 Get the current start time of playback.
virtual DtAbsoluteTime stopTime () const
 Get the stop time of the loaded file.
virtual DtAbsoluteTime firstMessageTime () const
 Get the first time of the loaded file.
virtual DtAbsoluteTime lastTime () const
 Get the last time of the loaded file.
virtual const DtStringcurrentFilename () const
 Get the current name of the actual file being used.
virtual const DtStringsavedFilename () const
 Get the name of the file which has been saved.
virtual bool loopAtEnd () const
 Get whether the logger will loop at the end of the tape.
virtual bool playOnLoad () const
 Get whether the file will play after it is loaded.
virtual bool fileFormatCurrent () const
 Get whether the current file format is the latest format.
virtual bool backupOnSave () const
 Get whether to backup on save.
virtual DtLgrEntityTrackerentityTracker () const
 Get the current file's entity tracker, or null if there is none.
virtual void addTemporaryTrackedEntity (const DtString &name)
 Adds a temporary entity to the entity tracker.

Protected Member Functions

bool prepareDriverForOpen ()
 Prepare driver for open file.
virtual void tickStopPlayback ()
virtual void tickNormalPlayback ()
virtual void tickPausePlayback ()
virtual void tickSkippingPlayback ()
virtual bool doSwapInFile (const DtString &filename, bool selectAll)
 Implement swap in temp file to use as unsaved file.
virtual bool doPlay ()
virtual bool doStop ()
virtual bool doPause ()
virtual bool doUnpause ()
virtual bool doPlaybackSpeedChange (double speed)
virtual void doTimeJump (const DtAbsoluteTime &time)
virtual void doSkippingPlay (const DtAbsoluteTime &time)
DtResponse openFile (const DtCommand &command)
 openFile command
virtual bool doOpenFile (DtString filename)
 Implementation of opening a file.
void sendFileInputChangedResponses (const DtString &filename)
 Send the necessary open file responses.
DtResponse closeFile (const DtCommand &command)
 closeFile command
DtResponse saveFile (const DtCommand &command)
 Handle the safeFile command.
DtResponse saveFileAs (const DtCommand &command)
 Handle the safe file as command.
DtResponse revertFile (const DtCommand &command)
 Handle the revert command.
DtResponse play (const DtCommand &command)
 play command
DtResponse playPause (const DtCommand &command)
 playPause command
DtResponse stop (const DtCommand &command)
 stop command
DtResponse restart (const DtCommand &command)
 restart command
DtResponse setStartStopTimes (const DtCommand &command)
 setStartStopTimes command
DtResponse setPlaybackSpeed (const DtCommand &command)
 setPlaybackSpeed command
DtResponse setCurrentTime (const DtCommand &command)
 setCurrentTime command
DtResponse skipTime (const DtCommand &command)
 SkipTime command.
DtResponse pause (const DtCommand &command)
 pause command
DtResponse unpause (const DtCommand &command)
 unpause command
DtResponse setLoopAtEnd (const DtCommand &command)
 setLoopAtEnd command.
DtResponse setPlayOnLoad (const DtCommand &command)
 setPlayOnLoad command.
DtResponse setBackupOnSave (const DtCommand &command)
 setBackupOnSave command.
DtResponse setSkippingPlaybackThreshold (const DtCommand &command)
 setSkippingPlayback command
virtual bool openFileInput (const DtString &filename, DtString &failureReason)
 Open the file input.
virtual void closeFileInput (bool clearHistory)
 Close the actual file history.
virtual void setFileHistoryCount (int count)
 Set the file history count.
virtual void addFileToHistory (const DtString &filename)
 Adds a file to the history, if necessary files are removed and deleted.
virtual void clearFileHistory ()
 Clears the file history and deletes each file.

Protected Attributes

std::deque< DtStringmyFileStack
DtString mySavedFileName
DtLgrFileInputmyFileInput
DtLgrSystemDrivermyDriver
DtMessagePipelinemyPipeline
bool myPausedFlag
bool myLoopAtEnd
bool myPlayOnLoadFlag
double myTimeScale
DtLgrClockmyPlaybackClock
DtAbsoluteTime myStartTime
DtAbsoluteTime myStopTime
DtAbsoluteTime myCurrentTime
bool myPlayingFlag
bool myBackupFlag
bool mySkippingPlayback
double mySkippingPlaybackThreshold
DtAbsoluteTime myNextSkipTime
unsigned int myFileHistoryCount

Static Protected Attributes

static const unsigned short theDomain = DtLgrCommandType::Domain_Player
static const unsigned short theProtocol = DtLgrCommandType::Protocol_None
static const int theDefaultFileHistoryCount = 1

Detailed Description

The class responsible for controlling the logger playback functionality.

The DtLgrPlaybackDriver is not thread safe. For thread- safe access use the DtLgrPlaybackInterface class.


Member Function Documentation

virtual bool MAKLogger::DtLgrPlaybackDriver::getPipeline ( ) [virtual]

Attempt to acquire the pipeline.

Return values:
trueThe pipeline has been acquired.
falseThe pipeline has not been acquired.

Implements MAKLogger::DtLgrCommandHandler.

virtual bool MAKLogger::DtLgrPlaybackDriver::hasPipeline ( ) const [virtual]

Does this object own the pipeline.

Return values:
trueThe pipeline is owned.
falseThe pipeline is not owned.

Implements MAKLogger::DtLgrCommandHandler.

virtual bool MAKLogger::DtLgrPlaybackDriver::releasePipeline ( ) [virtual]

Attempt to release the pipeline.

This function is called when the pipeline has been requested by a different driver. If the driver can't release the pipeline it will return false. By default this method simply succeeds. If the driver should override this function if it wishes to deny the request.

Return values:
trueThe pipeline has been released.
falseThe pipeline has not been released.

Implements MAKLogger::DtLgrCommandHandler.

virtual const DtString& MAKLogger::DtLgrPlaybackDriver::savedFilename ( ) const [virtual]

Get the name of the file which has been saved.

This is typically what is used.

virtual void MAKLogger::DtLgrPlaybackDriver::setUnsavedFile ( const DtString filename,
bool  selectAll 
) [virtual]

Set the lgrPlayback driver to use an unsaved file (while still using the filename of the original.


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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)