tRecordingCommandLineAnalyzer Class Reference

Inheritance diagram for tRecordingCommandLineAnalyzer:

Inheritance graph
[legend]
Collaboration diagram for tRecordingCommandLineAnalyzer:

Collaboration graph
[legend]

List of all members.

Private Member Functions

virtual bool DoAnalyze (tCommandLineParser &parser)
 Analyzes the command line option.
virtual void DoHelp (std::ostream &s)
 Analyzes the command line option.


Detailed Description

Definition at line 281 of file tRecorderInternal.cpp.


Member Function Documentation

virtual bool tRecordingCommandLineAnalyzer::DoAnalyze ( tCommandLineParser parser  )  [inline, private, virtual]

Analyzes the command line option.

Parameters:
parser parser to analyze
Returns:
true if anaysis was succesful

Implements tCommandLineAnalyzer.

Definition at line 284 of file tRecorderInternal.cpp.

References tCommandLineParser::GetOption(), and tRecorderImp< BASE, STREAM_IMP >::InitPlayback().

00285     {
00286         tString filename;
00287         if ( parser.GetOption( filename, "--record" ) )
00288         {
00289             // start a recorder
00290             static tRecorderImp< tRecording, std::ofstream > recorder( static_cast< char const * >( filename ) );
00291             return true;
00292         }
00293 
00294         if ( parser.GetOption( filename, "--playback" ) )
00295         {
00296             // start a playback
00297             static tRecorderImp< tPlayback, std::ifstream > recorder( static_cast< char const * >( filename ) );
00298             recorder.InitPlayback();
00299             return true;
00300         }
00301 
00302         return false;
00303     }

Here is the call graph for this function:

virtual void tRecordingCommandLineAnalyzer::DoHelp ( std::ostream &  s  )  [inline, private, virtual]

Analyzes the command line option.

Parameters:
s string to write help to

Implements tCommandLineAnalyzer.

Definition at line 305 of file tRecorderInternal.cpp.

00306     {                                      //
00307         s << "--record <filename>          : creates a DEBUG recording while running\n";
00308         s << "--playback <filename>        : plays back a DEBUG recording\n";
00309     }


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