gCommandLineJumpStartAnalyzer Class Reference

#include <gCommandLineJumpStart.h>

Inheritance diagram for gCommandLineJumpStartAnalyzer:

Inheritance graph
[legend]
Collaboration diagram for gCommandLineJumpStartAnalyzer:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

Allow a user to connect to an internet game directly from the command line

You should register the armagetronad:// protocol with your OS to allow greater functionality.

Definition at line 50 of file gCommandLineJumpStart.h.


Member Function Documentation

bool gCommandLineJumpStartAnalyzer::ShouldConnect (  )  [inline]

Definition at line 53 of file gCommandLineJumpStart.h.

References _shouldConnect.

Referenced by welcome().

00053 { return _shouldConnect; }

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Analyzes the command line option.

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

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 }

Here is the call graph for this function:

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

Analyzes the command line option.

Parameters:
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 }


Member Data Documentation

bool gCommandLineJumpStartAnalyzer::_shouldConnect [private]

Definition at line 56 of file gCommandLineJumpStart.h.

Referenced by DoAnalyze(), and ShouldConnect().

tString gCommandLineJumpStartAnalyzer::_raw [private]

Definition at line 57 of file gCommandLineJumpStart.h.

Referenced by Connect(), and DoAnalyze().


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