LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser Class Reference

Parses argv for the main function. More...

List of all members.

Public Member Functions

 OptionParser (int &argc, char **&argv)
std::string at (uint64_t index)
 Return the positional argument at the given index, or panic if there were not enough arguments.
std::string remaining (uint64_t index)
 Return all arguments at index or following it.
void done ()
 Panic if are any unused arguments remain.
void usageError (const std::string &message)
 Print an error and the usage message and exit nonzero.
std::string ospace (std::string option)
 Helper for spacing in usage() message.
void usage ()

Public Attributes

int & argc
char **& argv
std::vector< std::string > args
uint64_t lastIndex
std::string logPolicy
std::string server
uint64_t timeout

Detailed Description

Parses argv for the main function.

Definition at line 38 of file ServerControl.cc.


Constructor & Destructor Documentation

LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::OptionParser ( int &  argc,
char **&  argv 
) [inline]

Definition at line 40 of file ServerControl.cc.


Member Function Documentation

std::string LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::at ( uint64_t  index) [inline]

Return the positional argument at the given index, or panic if there were not enough arguments.

Definition at line 95 of file ServerControl.cc.

std::string LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::remaining ( uint64_t  index) [inline]

Return all arguments at index or following it.

Definition at line 105 of file ServerControl.cc.

void LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::done ( ) [inline]

Panic if are any unused arguments remain.

Definition at line 122 of file ServerControl.cc.

void LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::usageError ( const std::string &  message) [inline]

Print an error and the usage message and exit nonzero.

Definition at line 130 of file ServerControl.cc.

std::string LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::ospace ( std::string  option) [inline]

Helper for spacing in usage() message.

Definition at line 139 of file ServerControl.cc.

void LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::usage ( ) [inline]

Definition at line 146 of file ServerControl.cc.


Member Data Documentation

int& LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::argc

Definition at line 273 of file ServerControl.cc.

char**& LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::argv

Definition at line 274 of file ServerControl.cc.

std::vector<std::string> LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::args

Definition at line 275 of file ServerControl.cc.

uint64_t LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::lastIndex

Definition at line 276 of file ServerControl.cc.

std::string LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::logPolicy

Definition at line 277 of file ServerControl.cc.

std::string LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::server

Definition at line 278 of file ServerControl.cc.

uint64_t LogCabin::Client::anonymous_namespace{ServerControl.cc}::OptionParser::timeout

Definition at line 279 of file ServerControl.cc.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines