Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
Realm::CommandLineParser Class Reference

#include <cmdline.h>

Public Member Functions

 CommandLineParser (void)=default
 
 ~CommandLineParser (void)
 
template<typename T >
CommandLineParseradd_option_int (const std::string &optname, T &target, bool keep=false)
 
template<typename T >
CommandLineParseradd_option_int_units (const std::string &optname, T &target, char default_unit=0, bool binary=true, bool keep=false)
 
template<typename T >
CommandLineParseradd_option_string (const std::string &optname, T &target, bool keep=false)
 
CommandLineParseradd_option_string (const std::string &optname, char *target, size_t maxlen, bool keep=false)
 
template<typename T >
CommandLineParseradd_option_stringlist (const std::string &optname, T &target, bool keep=false)
 
CommandLineParseradd_option_bool (const std::string &optname, bool &target, bool keep=false)
 
template<typename T >
CommandLineParseradd_option_method (const std::string &optname, T *target, bool(T::*method)(const std::string &), bool keep=false)
 
RealmStatus parse_command_line_v2 (std::vector< std::string > &cmdline)
 
RealmStatus parse_command_line_v2 (int argc, const char *argv[])
 
RealmStatus parse_command_line_v2 (int argc, char *argv[])
 
bool parse_command_line (std::vector< std::string > &cmdline)
 
bool parse_command_line (int argc, const char *argv[])
 
bool parse_command_line (int argc, char *argv[])
 

Protected Attributes

std::vector< CommandLineOption * > options
 

Constructor & Destructor Documentation

◆ CommandLineParser()

Realm::CommandLineParser::CommandLineParser ( void  )
default

◆ ~CommandLineParser()

Realm::CommandLineParser::~CommandLineParser ( void  )

Member Function Documentation

◆ add_option_bool()

CommandLineParser & Realm::CommandLineParser::add_option_bool ( const std::string &  optname,
bool &  target,
bool  keep = false 
)

◆ add_option_int()

template<typename T >
CommandLineParser & Realm::CommandLineParser::add_option_int ( const std::string &  optname,
T &  target,
bool  keep = false 
)

◆ add_option_int_units()

template<typename T >
CommandLineParser & Realm::CommandLineParser::add_option_int_units ( const std::string &  optname,
T &  target,
char  default_unit = 0,
bool  binary = true,
bool  keep = false 
)

◆ add_option_method()

template<typename T >
CommandLineParser & Realm::CommandLineParser::add_option_method ( const std::string &  optname,
T *  target,
bool(T::*)(const std::string &)  method,
bool  keep = false 
)

◆ add_option_string() [1/2]

CommandLineParser & Realm::CommandLineParser::add_option_string ( const std::string &  optname,
char *  target,
size_t  maxlen,
bool  keep = false 
)

◆ add_option_string() [2/2]

template<typename T >
CommandLineParser & Realm::CommandLineParser::add_option_string ( const std::string &  optname,
T &  target,
bool  keep = false 
)

◆ add_option_stringlist()

template<typename T >
CommandLineParser & Realm::CommandLineParser::add_option_stringlist ( const std::string &  optname,
T &  target,
bool  keep = false 
)

◆ parse_command_line() [1/3]

bool Realm::CommandLineParser::parse_command_line ( int  argc,
char *  argv[] 
)

◆ parse_command_line() [2/3]

bool Realm::CommandLineParser::parse_command_line ( int  argc,
const char *  argv[] 
)

◆ parse_command_line() [3/3]

bool Realm::CommandLineParser::parse_command_line ( std::vector< std::string > &  cmdline)

◆ parse_command_line_v2() [1/3]

RealmStatus Realm::CommandLineParser::parse_command_line_v2 ( int  argc,
char *  argv[] 
)

◆ parse_command_line_v2() [2/3]

RealmStatus Realm::CommandLineParser::parse_command_line_v2 ( int  argc,
const char *  argv[] 
)

◆ parse_command_line_v2() [3/3]

RealmStatus Realm::CommandLineParser::parse_command_line_v2 ( std::vector< std::string > &  cmdline)

Member Data Documentation

◆ options

std::vector<CommandLineOption *> Realm::CommandLineParser::options
protected

The documentation for this class was generated from the following file: