Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

CLP Class Reference

#include <CLP.h>

List of all members.

Public Member Functions

void addUsage (const std::string usage)
void addSwitch (std::string name, std::string shortName, std::string description, unsigned numberOfArguments=0)
std::string getSwitchArgument (std::string name, unsigned index)
bool parse (int argc, char *argv[])
bool hasSwitchSet (std::string name)
const std::vector< std::string > & getArguments ()
const std::vector< std::string > & getNetworkArguments ()
const std::vector< std::string > & getMysqlArguments ()
bool hasMysqlArguments ()
void printHelp ()
void printArguments ()

Private Member Functions

void _setSwitchArguments (std::string currentSwitch, int argc, char *argv[], int &currentIndex, CLS &cls)
void _processMysqlArguments (std::string argument)
std::string _getShortSwitchNameMapping (const std::string &shortName)
bool _shortNameExists (const std::string &shortName)

Private Attributes

std::string _usage
std::map< std::string, std::string > _shortSwitchMapping
std::map< std::string, CLS_switches
std::vector< std::string > _arguments
std::vector< std::string > _networkArguments
std::vector< std::string > _mysqlArguments

Static Private Attributes

static const std::string _NETWORK_TYPE = "http://"
static const std::string _NETWORK_TYPE_SECURE = "https://"
static const std::string _MYSQL_TYPE = "mysql://"


Member Function Documentation

std::string CLP::_getShortSwitchNameMapping const std::string &  shortName  )  [private]
 

void CLP::_processMysqlArguments std::string  argument  )  [private]
 

void CLP::_setSwitchArguments std::string  currentSwitch,
int  argc,
char *  argv[],
int &  currentIndex,
CLS cls
[private]
 

_setSwitchArguments: Some of the switches require arguments. This method saves the arguments passed to a switch in a map.

bool CLP::_shortNameExists const std::string &  shortName  )  [private]
 

void CLP::addSwitch std::string  name,
std::string  shortName,
std::string  description,
unsigned  numberOfArguments = 0
 

void CLP::addUsage const std::string  usage  ) 
 

const std::vector< std::string > & CLP::getArguments  ) 
 

const std::vector< std::string > & CLP::getMysqlArguments  ) 
 

const std::vector< std::string > & CLP::getNetworkArguments  ) 
 

std::string CLP::getSwitchArgument std::string  name,
unsigned  index
 

getSwitchArgument: Some of the command line switches require arguments. This method returns the index'th argument specified by the user for a switch.

bool CLP::hasMysqlArguments  )  [inline]
 

bool CLP::hasSwitchSet std::string  name  ) 
 

bool CLP::parse int  argc,
char *  argv[]
 

parse: Parses the command line arguments. Returns false if there was an error encountered.

void CLP::printArguments  ) 
 

void CLP::printHelp  ) 
 


Member Data Documentation

std::vector<std::string> CLP::_arguments [private]
 

const std::string CLP::_MYSQL_TYPE = "mysql://" [static, private]
 

std::vector<std::string> CLP::_mysqlArguments [private]
 

const std::string CLP::_NETWORK_TYPE = "http://" [static, private]
 

const std::string CLP::_NETWORK_TYPE_SECURE = "https://" [static, private]
 

std::vector<std::string> CLP::_networkArguments [private]
 

std::map<std::string,std::string> CLP::_shortSwitchMapping [private]
 

std::map<std::string, CLS> CLP::_switches [private]
 

std::string CLP::_usage [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4