tPlayback Class Reference

playback class More...

#include <tRecorderInternal.h>

Collaboration diagram for tPlayback:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::istream STREAM
 stream typedef

Public Member Functions

 tPlayback ()
 default constructor

Protected Member Functions

virtual ~tPlayback ()
 destructor
void AdvanceSection ()
 begin reading next section

Private Member Functions

 tPlayback (tPlayback const &other)
 copy constructor
tPlaybackoperator= (tPlayback const &other)
 copy operator
std::string const & GetNextSection () const
 name of the next section
virtual std::istream & DoGetStream ()=0
 returns the stream to read from

Private Attributes

std::string nextSection_
 the name of the next section

Static Private Attributes

static tPlaybackcurrentPlayback_ = 0
 the currently running playback

Friends

class tPlaybackBlockBase


Detailed Description

playback class

Definition at line 64 of file tRecorderInternal.h.


Member Typedef Documentation

typedef std::istream tPlayback::STREAM

stream typedef

Definition at line 71 of file tRecorderInternal.h.


Constructor & Destructor Documentation

tPlayback::tPlayback (  ) 

default constructor

Definition at line 178 of file tRecorderInternal.cpp.

References currentPlayback_, and tASSERT.

00179 {
00180     tASSERT( !currentPlayback_ );
00181 
00182     // set current Playback
00183     currentPlayback_ = this;
00184 }

tPlayback::~tPlayback (  )  [protected, virtual]

destructor

Returns:
the stream to write to

Definition at line 163 of file tRecorderInternal.cpp.

References currentPlayback_.

00164 {
00165     // clear current Playback
00166     currentPlayback_ = 0;
00167 }

tPlayback::tPlayback ( tPlayback const &  other  )  [private]

copy constructor

Parameters:
other the source to copy from

Definition at line 196 of file tRecorderInternal.cpp.

References tASSERT.

00197 {
00198     tASSERT(false);
00199 }


Member Function Documentation

void tPlayback::AdvanceSection ( void   )  [protected]

begin reading next section

Definition at line 257 of file tRecorderInternal.cpp.

References con, currentPlayback_, DoGetStream(), nextSection_, and NULL.

Referenced by tPlaybackBlockBase::~tPlaybackBlockBase().

00258 {
00259     std::istream& stream = DoGetStream();
00260 
00261     std::ws( stream );
00262     stream >> nextSection_;
00263     std::ws( stream );
00264 
00265     // memorize if end marking was seen
00266     static bool end = false;
00267     if ( nextSection_ == "END" )
00268         end = true;
00269 
00270     if ( !stream.good() )
00271     {
00272         if ( !end )
00273             con << "Recording ends abruptly here, prepare for a crash!\n";
00274 
00275         // stop playing back
00276         nextSection_ = "EOF";
00277         currentPlayback_ = NULL;
00278     }
00279 }

Here is the call graph for this function:

Here is the caller graph for this function:

tPlayback & tPlayback::operator= ( tPlayback const &  other  )  [private]

copy operator

Parameters:
other the source to copy from
Returns:
a reference to this

Definition at line 212 of file tRecorderInternal.cpp.

References tASSERT.

00213 {
00214     tASSERT(false);
00215 
00216     return *this;
00217 }

const std::string & tPlayback::GetNextSection ( void   )  const [private]

name of the next section

Returns:
the name of the next section

Definition at line 228 of file tRecorderInternal.cpp.

References nextSection_.

Referenced by tPlaybackBlockBase::Initialize().

00229 {
00230     return nextSection_;
00231 }

Here is the caller graph for this function:

virtual std::istream& tPlayback::DoGetStream (  )  [private, pure virtual]

returns the stream to read from

Referenced by AdvanceSection(), and tPlaybackBlockBase::GetPlaybackStream().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class tPlaybackBlockBase [friend]

Definition at line 66 of file tRecorderInternal.h.


Member Data Documentation

std::string tPlayback::nextSection_ [private]

the name of the next section

Definition at line 84 of file tRecorderInternal.h.

Referenced by AdvanceSection(), and GetNextSection().

tPlayback * tPlayback::currentPlayback_ = 0 [static, private]

the currently running playback

Definition at line 85 of file tRecorderInternal.h.

Referenced by AdvanceSection(), tPlaybackBlockBase::GetArchive(), tPlaybackBlockBase::Initialize(), tPlayback(), and ~tPlayback().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:58:06 2008 for Armagetron Advanced by  doxygen 1.5.4