#include <tRecorder.h>
Public Member Functions | |
bool | Initialize (char const *section, tRecording *recording) |
initializes this for recording | |
bool | Initialize (char const *section) |
initializes this for recording | |
void | Separator () |
separates two recorded elements (more than usual) | |
Static Public Member Functions | |
static tRecording * | GetArchive () |
returns the active recording | |
Protected Member Functions | |
tRecordingBlockBase () | |
default constructor | |
~tRecordingBlockBase () | |
ends a recording block | |
std::ostream & | GetRecordingStream () const |
returns the stream to record to | |
Protected Attributes | |
bool | separate_ |
flag indicating whether a separation is needed before the next data element | |
Private Attributes | |
tRecording * | recording_ |
the recording to record to |
Definition at line 258 of file tRecorder.h.
tRecordingBlockBase::tRecordingBlockBase | ( | void | ) | [protected] |
default constructor
Definition at line 330 of file tRecorder.cpp.
00331 : separate_( true ), recording_( NULL ) 00332 { 00333 }
tRecordingBlockBase::~tRecordingBlockBase | ( | void | ) | [protected] |
ends a recording block
Definition at line 344 of file tRecorder.cpp.
References GetRecordingStream(), and recording_.
00345 { 00346 // make sure everything is logged, even if program crashes 00347 if (recording_) 00348 GetRecordingStream().flush(); 00349 00350 recording_ = 0; 00351 }
bool tRecordingBlockBase::Initialize | ( | char const * | section, | |
tRecording * | recording | |||
) |
initializes this for recording
section | name of the section to start | |
recording | recording to read block from |
Definition at line 260 of file tRecorder.cpp.
References tRecording::BeginSection(), and recording_.
Referenced by Initialize().
00261 { 00262 // initialize recording pointer 00263 recording_ = recording; 00264 if (!recording_) 00265 return false; 00266 00267 // start section 00268 recording_->BeginSection( section ); 00269 00270 // return success 00271 return true; 00272 }
bool tRecordingBlockBase::Initialize | ( | char const * | section | ) |
initializes this for recording
section | name of the section to start |
Definition at line 285 of file tRecorder.cpp.
References tRecording::currentRecording_, and Initialize().
00286 { 00287 // delegate 00288 return Initialize( section, tRecording::currentRecording_ ); 00289 }
void tRecordingBlockBase::Separator | ( | void | ) |
separates two recorded elements (more than usual)
Definition at line 300 of file tRecorder.cpp.
References GetRecordingStream(), and separate_.
00301 { 00302 GetRecordingStream() << "\n"; 00303 separate_ = false; 00304 }
tRecording * tRecordingBlockBase::GetArchive | ( | void | ) | [static] |
returns the active recording
Definition at line 316 of file tRecorder.cpp.
References tRecording::currentRecording_.
Referenced by tRecorderBase::IsRecording().
00317 { 00318 return tRecording::currentRecording_; 00319 }
std::ostream & tRecordingBlockBase::GetRecordingStream | ( | ) | const [protected] |
returns the stream to record to
Definition at line 363 of file tRecorder.cpp.
References tRecording::DoGetStream(), recording_, and tASSERT.
Referenced by Separator(), tRecordingBlock::Write(), and ~tRecordingBlockBase().
00364 { 00365 tASSERT( recording_ ); 00366 00367 return recording_->DoGetStream(); 00368 }
bool tRecordingBlockBase::separate_ [protected] |
flag indicating whether a separation is needed before the next data element
Definition at line 272 of file tRecorder.h.
Referenced by Separator(), and tRecordingBlock::Write().
tRecording* tRecordingBlockBase::recording_ [private] |
the recording to record to
Definition at line 274 of file tRecorder.h.
Referenced by GetRecordingStream(), Initialize(), and ~tRecordingBlockBase().