#include <gCommandLineJumpStart.h>
Public Member Functions | |
bool | ShouldConnect () |
void | Connect () |
Private Member Functions | |
virtual bool | DoAnalyze (tCommandLineParser &parser) |
Analyzes the command line option. | |
virtual void | DoHelp (std::ostream &s) |
Analyzes the command line option. | |
Private Attributes | |
bool | _shouldConnect |
tString | _raw |
You should register the armagetronad:// protocol with your OS to allow greater functionality.
Definition at line 50 of file gCommandLineJumpStart.h.
bool gCommandLineJumpStartAnalyzer::ShouldConnect | ( | ) | [inline] |
Definition at line 53 of file gCommandLineJumpStart.h.
References _shouldConnect.
Referenced by welcome().
00053 { return _shouldConnect; }
void gCommandLineJumpStartAnalyzer::Connect | ( | ) |
Definition at line 61 of file gCommandLineJumpStart.cpp.
References _raw, ConnectToServer(), ExtractConnectionInformation(), server(), and tString::ToInt().
Referenced by welcome().
00062 { 00063 tString server; 00064 tString port; 00065 00066 ExtractConnectionInformation( _raw, server, port ); 00067 00068 nServerInfoRedirect connectTo( server, port.ToInt() ); 00069 00070 ConnectToServer( &connectTo ); 00071 }
bool gCommandLineJumpStartAnalyzer::DoAnalyze | ( | tCommandLineParser & | parser | ) | [private, virtual] |
Analyzes the command line option.
parser | parser to analyze |
Implements tCommandLineAnalyzer.
Definition at line 40 of file gCommandLineJumpStart.cpp.
References _raw, _shouldConnect, and tCommandLineParser::GetOption().
00041 { 00042 if ( parser.GetOption( _raw, "--connect" ) ) 00043 { 00044 _shouldConnect = true; 00045 00046 return true; 00047 } 00048 else 00049 { 00050 _shouldConnect = false; 00051 } 00052 00053 return false; 00054 }
void gCommandLineJumpStartAnalyzer::DoHelp | ( | std::ostream & | s | ) | [private, virtual] |
Analyzes the command line option.
s | string to write help to |
Implements tCommandLineAnalyzer.
Definition at line 56 of file gCommandLineJumpStart.cpp.
00057 { 00058 s << "--connect <server>[:<port>] : connect directly to SERVER, skipping all menus. default PORT=4534\n"; 00059 }
bool gCommandLineJumpStartAnalyzer::_shouldConnect [private] |
Definition at line 56 of file gCommandLineJumpStart.h.
Referenced by DoAnalyze(), and ShouldConnect().
tString gCommandLineJumpStartAnalyzer::_raw [private] |