#include "tRecorder.h"
#include "tConfiguration.h"
#include "tDirectories.h"
#include "tRecorderInternal.h"
Go to the source code of this file.
Defines | |
#define | INLINE_DEF |
Functions | |
std::ostream & | operator<< (std::ostream &s, tLineString const &line) |
persistent string writing operator | |
std::istream & | operator>> (std::istream &s, tLineString &line) |
persistent string reading operator | |
static int | st_GetDebugLevelPlayback () |
REAL | st_GetDifference (REAL a, REAL b) |
REAL | st_GetDifference (int a, int b) |
REAL | st_GetDifference (unsigned int a, unsigned int b) |
REAL | st_GetDifference (unsigned long int a, unsigned long int b) |
REAL | st_GetDifference (tString const &a, tString const &b) |
Variables | |
static int | st_debugLevelRecording = 0 |
static tSettingItem< int > | rdb ("RECORDING_DEBUGLEVEL", st_debugLevelRecording) |
static char const * | st_fileOpen = "FILE_OPEN" |
static char const * | st_fileRead = "FILE_READ" |
#define INLINE_DEF |
Definition at line 38 of file tRecorder.cpp.
std::ostream& operator<< | ( | std::ostream & | s, | |
tLineString const & | line | |||
) |
persistent string writing operator
Definition at line 183 of file tRecorder.cpp.
References c, and tString::Len().
00184 { 00185 // write magic character 00186 s << 'L'; 00187 00188 // print string, encode newlines 00189 for( int i=0; i<line.Len(); ++i) 00190 { 00191 char c = line[i]; 00192 if ( c == '\n' ) 00193 s << "\\n"; 00194 if ( c == '\\' ) 00195 s << "\\\\"; 00196 else if ( c != '\0' ) 00197 s << c; 00198 } 00199 00200 return s << '\n'; 00201 }
std::istream& operator>> | ( | std::istream & | s, | |
tLineString & | line | |||
) |
persistent string reading operator
Definition at line 204 of file tRecorder.cpp.
References c, tString::Clear(), tString::ReadLine(), tString::Size(), and tASSERT.
00205 { 00206 // read magic character 00207 char c; 00208 s >> c; 00209 tASSERT( 'L' == c ); 00210 00211 tString read; 00212 00213 // read line 00214 read.ReadLine(s); 00215 00216 // std::cout << "Read: " << read << "\n"; 00217 00218 line.Clear(); 00219 00220 // copy line, replacing "\n" with real newline 00221 for(size_t i=0; i<read.Size(); ++i) 00222 { 00223 char c = read[i]; 00224 if ( c != '\\' || i+1 == read.Size() || ( read[i+1] != 'n' && read[i+1] != '\\' ) ) 00225 { 00226 line << c; 00227 } 00228 else if ( read[i+1] == '\\' ) 00229 { 00230 line << "\\"; 00231 i++; 00232 } 00233 else // if ( read[i+1] != 'n' ) 00234 { 00235 line << "\n"; 00236 i++; 00237 } 00238 } 00239 00240 return s; 00241 }
static int st_GetDebugLevelPlayback | ( | ) | [static] |
Definition at line 559 of file tRecorder.cpp.
References tRecorder::Playback(), tRecorder::Record(), and st_debugLevelRecording.
Referenced by tRecorderSyncBase::GetDebugLevelPlayback().
00560 { 00561 // sync level with recording 00562 int level = st_debugLevelRecording; 00563 tRecorder::Playback( "DEBUGLEVEL", level ); 00564 tRecorder::Record( "DEBUGLEVEL", st_debugLevelRecording ); 00565 00566 return level; 00567 }
REAL st_GetDifference | ( | unsigned long int | a, | |
unsigned long int | b | |||
) |
REAL st_GetDifference | ( | unsigned int | a, | |
unsigned int | b | |||
) |
REAL st_GetDifference | ( | int | a, | |
int | b | |||
) |
tSettingItem<int> rdb("RECORDING_DEBUGLEVEL", st_debugLevelRecording) [static] |
int st_debugLevelRecording = 0 [static] |
Definition at line 554 of file tRecorder.cpp.
Referenced by tRecorderSyncBase::GetDebugLevelRecording(), and st_GetDebugLevelPlayback().
char const* st_fileOpen = "FILE_OPEN" [static] |
char const* st_fileRead = "FILE_READ" [static] |