Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

ArClientSimpleConnector Class Reference

This will let you connect to different hosts, ports, and with different users and passwords more easily. More...

#include <ArClientSimpleConnector.h>

List of all members.

Public Member Functions

 ArClientSimpleConnector (ArArgumentBuilder *arguments)
 Constructor that takes argument builder (not prefered).
 ArClientSimpleConnector (int *argc, char **argv)
 Constructor that takes args from main (not prefered).
 ArClientSimpleConnector (ArArgumentParser *parser)
 Constructor that takes argument parser (prefered).
bool connectClient (ArClientBase *client)
 Connects the client with the options given.
void logOptions (void) const
 Logs the options the connector has.
bool parseArgs (ArArgumentParser *parser)
 Parses the arguments.
bool parseArgs (void)
 Parses the arguments.
 ~ArClientSimpleConnector (void)
 Destructor.

Protected Member Functions

void reset (void)

Protected Attributes

const char * myHost
bool myLogDataList
ArConstFunctorC< ArClientSimpleConnectormyLogOptionsCB
bool myNoPassword
bool myOwnParser
ArRetFunctorC< bool, ArClientSimpleConnectormyParseArgsCB
ArArgumentParsermyParser
const char * myPassword
int myPort
const char * myServerKey
const char * myUser


Detailed Description

This will let you connect to different hosts, ports, and with different users and passwords more easily.

To set the host the client will connect to use '-host hostName' in the command line parameters (no abbreviation for this since -h is for help and it's only 4 letters). To set the port the client will connect to use '-port portNumber' or '-p portNumber'. To set the user to connect with use '-user userName' or '-u userName'. To set the password to connect with use '-password password' or '-pwd password'. To use no password use '-nopassword' or '-np'. Note that for using passwords you should NOT use that option on the command line since that can show everyone what the password is (especially in Linux), it's there only for testing. If you give it a username without a password it'll ask you for a password, if you don't have a password just use the -nopassword or let it ask you for a password and hit enter. To set the server key (string we need to connect to the server) use '-setServerKey serverKey' or '-ssk serverKey'.

Definition at line 57 of file ArClientSimpleConnector.h.


Constructor & Destructor Documentation

ArClientSimpleConnector::ArClientSimpleConnector ArArgumentParser parser  ) 
 

Constructor that takes argument parser (prefered).

Definition at line 56 of file ArClientSimpleConnector.cpp.

References Aria::addLogOptionsCB(), Aria::addParseArgsCB(), myLogOptionsCB, myOwnParser, myParseArgsCB, myParser, reset(), and ArFunctor::setName().

ArClientSimpleConnector::ArClientSimpleConnector int *  argc,
char **  argv
 

Constructor that takes args from main (not prefered).

Definition at line 30 of file ArClientSimpleConnector.cpp.

References Aria::addLogOptionsCB(), Aria::addParseArgsCB(), myLogOptionsCB, myOwnParser, myParseArgsCB, myParser, reset(), and ArFunctor::setName().

ArClientSimpleConnector::ArClientSimpleConnector ArArgumentBuilder arguments  ) 
 

Constructor that takes argument builder (not prefered).

Definition at line 43 of file ArClientSimpleConnector.cpp.

References Aria::addLogOptionsCB(), Aria::addParseArgsCB(), myLogOptionsCB, myOwnParser, myParseArgsCB, myParser, reset(), and ArFunctor::setName().

ArClientSimpleConnector::~ArClientSimpleConnector void   ) 
 

Destructor.

Definition at line 69 of file ArClientSimpleConnector.cpp.


Member Function Documentation

bool ArClientSimpleConnector::connectClient ArClientBase client  ) 
 

Connects the client with the options given.

Definition at line 141 of file ArClientSimpleConnector.cpp.

References ArClientBase::blockingConnect(), client, ArClientBase::logDataList(), myHost, myLogDataList, myNoPassword, myPassword, myPort, myServerKey, myUser, and ArClientBase::setServerKey().

Referenced by main().

void ArClientSimpleConnector::logOptions void   )  const
 

Logs the options the connector has.

Definition at line 125 of file ArClientSimpleConnector.cpp.

References ArLog::log().

Referenced by main().

bool ArClientSimpleConnector::parseArgs ArArgumentParser parser  ) 
 

Parses the arguments.

Definition at line 90 of file ArClientSimpleConnector.cpp.

References myHost, myLogDataList, myNoPassword, myPassword, myPort, myServerKey, and myUser.

bool ArClientSimpleConnector::parseArgs void   ) 
 

Parses the arguments.

Definition at line 85 of file ArClientSimpleConnector.cpp.

References myParser.

Referenced by main().

void ArClientSimpleConnector::reset void   )  [protected]
 

Definition at line 74 of file ArClientSimpleConnector.cpp.

References myHost, myLogDataList, myNoPassword, myPassword, myPort, myServerKey, and myUser.

Referenced by ArClientSimpleConnector().


Member Data Documentation

const char* ArClientSimpleConnector::myHost [protected]
 

Definition at line 78 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().

bool ArClientSimpleConnector::myLogDataList [protected]
 

Definition at line 84 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().

ArConstFunctorC<ArClientSimpleConnector> ArClientSimpleConnector::myLogOptionsCB [protected]
 

Definition at line 90 of file ArClientSimpleConnector.h.

Referenced by ArClientSimpleConnector().

bool ArClientSimpleConnector::myNoPassword [protected]
 

Definition at line 83 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().

bool ArClientSimpleConnector::myOwnParser [protected]
 

Definition at line 87 of file ArClientSimpleConnector.h.

Referenced by ArClientSimpleConnector().

ArRetFunctorC<bool, ArClientSimpleConnector> ArClientSimpleConnector::myParseArgsCB [protected]
 

Definition at line 89 of file ArClientSimpleConnector.h.

Referenced by ArClientSimpleConnector().

ArArgumentParser* ArClientSimpleConnector::myParser [protected]
 

Definition at line 86 of file ArClientSimpleConnector.h.

Referenced by ArClientSimpleConnector(), and parseArgs().

const char* ArClientSimpleConnector::myPassword [protected]
 

Definition at line 80 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().

int ArClientSimpleConnector::myPort [protected]
 

Definition at line 82 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().

const char* ArClientSimpleConnector::myServerKey [protected]
 

Definition at line 81 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().

const char* ArClientSimpleConnector::myUser [protected]
 

Definition at line 79 of file ArClientSimpleConnector.h.

Referenced by connectClient(), parseArgs(), and reset().


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:51 2007 for ArNetworking by  doxygen 1.4.0