tPlaybackBlockBase Class Reference

a block of data to play back. More...

#include <tRecorder.h>

Inheritance diagram for tPlaybackBlockBase:

Inheritance graph
[legend]
Collaboration diagram for tPlaybackBlockBase:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool Initialize (char const *section, tPlayback *playback)
 initializes this for recording
bool Initialize (char const *section)
 initializes this for recording
void Separator () const
 separate output (Nothing done here while playing back)

Static Public Member Functions

static tPlayback * GetArchive ()
 returns the active playback

Protected Member Functions

 tPlaybackBlockBase ()
 default constructor
 ~tPlaybackBlockBase ()
 ends a playback block
std::istream & GetPlaybackStream () const
 returns the stream to playback from

Private Attributes

tPlayback * playback_
 the playback to read from


Detailed Description

a block of data to play back.

Definition at line 314 of file tRecorder.h.


Constructor & Destructor Documentation

tPlaybackBlockBase::tPlaybackBlockBase ( void   )  [protected]

default constructor

Definition at line 483 of file tRecorder.cpp.

00484         : playback_( 0 )
00485 {
00486 }

tPlaybackBlockBase::~tPlaybackBlockBase ( void   )  [protected]

ends a playback block

Definition at line 497 of file tRecorder.cpp.

References tPlayback::AdvanceSection(), and playback_.

00498 {
00499     // end current block and read next
00500     if ( playback_ )
00501         playback_->AdvanceSection();
00502 
00503     playback_ = 0;
00504 }

Here is the call graph for this function:


Member Function Documentation

bool tPlaybackBlockBase::Initialize ( char const *  section,
tPlayback *  playback 
)

initializes this for recording

Parameters:
section name of section to read
playback playback to read from
Returns:
true on success

Definition at line 413 of file tRecorder.cpp.

References tPlayback::GetNextSection(), NULL, and playback_.

Referenced by Initialize().

00414 {
00415     // initialize playback pointer
00416     playback_ = playback;
00417     if (!playback_)
00418         return false;
00419 
00420     // read section
00421     if( playback_->GetNextSection() != section )
00422     {
00423         playback_ = NULL;
00424         return false;
00425     }
00426 
00427     // return success
00428     return true;
00429 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool tPlaybackBlockBase::Initialize ( char const *  section  ) 

initializes this for recording

Parameters:
section name of section to read
Returns:
true on success

Definition at line 442 of file tRecorder.cpp.

References tPlayback::currentPlayback_, and Initialize().

00443 {
00444     return Initialize( section, tPlayback::currentPlayback_ );
00445 }

Here is the call graph for this function:

void tPlaybackBlockBase::Separator ( void   )  const

separate output (Nothing done here while playing back)

Definition at line 456 of file tRecorder.cpp.

00457 {
00458 }

tPlayback * tPlaybackBlockBase::GetArchive ( void   )  [static]

returns the active playback

Returns:
the currently running playback

Definition at line 469 of file tRecorder.cpp.

References tPlayback::currentPlayback_.

Referenced by tRecorderBase::IsPlayingBack().

00470 {
00471     return tPlayback::currentPlayback_;
00472 }

Here is the caller graph for this function:

std::istream & tPlaybackBlockBase::GetPlaybackStream (  )  const [protected]

returns the stream to playback from

Returns:
the stream of the playback

Definition at line 516 of file tRecorder.cpp.

References tPlayback::DoGetStream(), playback_, and tASSERT.

Referenced by tPlaybackBlock::Read().

00517 {
00518     tASSERT( playback_ );
00519 
00520     return playback_->DoGetStream();
00521 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

tPlayback* tPlaybackBlockBase::playback_ [private]

the playback to read from

Definition at line 329 of file tRecorder.h.

Referenced by GetPlaybackStream(), Initialize(), and ~tPlaybackBlockBase().


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