ParamKit
A small library helping to parse commandline parameters (for Windows).
|
Namespaces | |
util | |
Classes | |
class | Param |
The base class of a parameter. More... | |
class | ParamCompare |
A comparator class for Param class. More... | |
class | IntParam |
A parameter storing an integer value. More... | |
class | StringParam |
A parameter storing a string value. More... | |
class | WStringParam |
A parameter storing a wide string value. More... | |
class | BoolParam |
A parameter storing a boolean value. More... | |
class | EnumParam |
A parameter storing an enum value. More... | |
class | StringListParam |
class | IntListParam |
class | ParamGroup |
The class responsible for grouping parameters (objects of the type Param) More... | |
class | Params |
The class responsible for storing and parsing parameters (objects of the type Param), possibly divided into groups (ParamGroup) More... | |
Functions | |
bool | is_hex (const char *buf, size_t len) |
bool | is_hex_with_prefix (const char *buf) |
bool | is_dec (const char *buf, size_t len) |
bool | is_number (const char *my_buf) |
long | get_number (const char *my_buf) |
size_t | strip_to_list (IN std::string s, IN std::string delim, OUT std::set< std::string > &elements_list) |
std::string & | trim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
bool | get_console_color (HANDLE hConsole, int &color) |
void | print_in_color (int color, const std::string &text) |
template<typename T_CHAR > | |
std::string | to_string (T_CHAR *str1) |
template<typename T_CHAR > | |
int | loadInt (const T_CHAR *str1, bool isHex=false) |
template<typename T_CHAR > | |
bool | loadBoolean (IN const T_CHAR *str1, OUT bool &value) |
template<typename T_STR , typename T_CHAR > | |
size_t | copy_to_cstr (T_STR value, T_CHAR *buf, size_t buf_count) |
Copy the std::string/std::wstring value into an buffer of a given character count. More... | |
std::string & | ltrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
std::string & | rtrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Variables | |
const WORD | ERROR_COLOR = RED |
const WORD | WARNING_COLOR = RED |
const WORD | HILIGHTED_COLOR = WHITE |
const WORD | HEADER_COLOR = YELLOW |
const WORD | SEPARATOR_COLOR = BROWN |
const WORD | INACTIVE_COLOR = GRAY |
const WORD | PARAM_SIMILAR_NAME = MAKE_COLOR(MAGENTA, BLACK) |
const WORD | PARAM_SIMILAR_DESC = MAKE_COLOR(BLACK, MAGENTA) |
size_t paramkit::copy_to_cstr | ( | T_STR | value, |
T_CHAR * | buf, | ||
size_t | buf_count | ||
) |
bool paramkit::get_console_color | ( | HANDLE | hConsole, |
int & | color | ||
) |
Definition at line 85 of file pk_util.cpp.
long paramkit::get_number | ( | const char * | my_buf | ) |
bool paramkit::is_dec | ( | const char * | buf, |
size_t | len | ||
) |
Definition at line 16 of file pk_util.cpp.
bool paramkit::is_hex | ( | const char * | buf, |
size_t | len | ||
) |
Definition at line 4 of file pk_util.cpp.
bool paramkit::is_hex_with_prefix | ( | const char * | buf | ) |
bool paramkit::is_number | ( | const char * | my_buf | ) |
bool paramkit::loadBoolean | ( | IN const T_CHAR * | str1, |
OUT bool & | value | ||
) |
int paramkit::loadInt | ( | const T_CHAR * | str1, |
bool | isHex = false |
||
) |
std::string& paramkit::ltrim | ( | std::string & | str, |
const std::string & | chars = "\t\n\v\f\r " |
||
) |
Definition at line 108 of file pk_util.cpp.
void paramkit::print_in_color | ( | int | color, |
const std::string & | text | ||
) |
std::string& paramkit::rtrim | ( | std::string & | str, |
const std::string & | chars = "\t\n\v\f\r " |
||
) |
Definition at line 114 of file pk_util.cpp.
size_t paramkit::strip_to_list | ( | IN std::string | s, |
IN std::string | delim, | ||
OUT std::set< std::string > & | elements_list | ||
) |
std::string paramkit::to_string | ( | T_CHAR * | str1 | ) |
std::string & paramkit::trim | ( | std::string & | str, |
const std::string & | chars = "\t\n\v\f\r " |
||
) |
const WORD paramkit::ERROR_COLOR = RED |
Definition at line 7 of file color_scheme.h.
const WORD paramkit::HEADER_COLOR = YELLOW |
Definition at line 11 of file color_scheme.h.
const WORD paramkit::HILIGHTED_COLOR = WHITE |
Definition at line 9 of file color_scheme.h.
const WORD paramkit::INACTIVE_COLOR = GRAY |
Definition at line 13 of file color_scheme.h.
const WORD paramkit::PARAM_SIMILAR_DESC = MAKE_COLOR(BLACK, MAGENTA) |
Definition at line 16 of file color_scheme.h.
const WORD paramkit::PARAM_SIMILAR_NAME = MAKE_COLOR(MAGENTA, BLACK) |
Definition at line 15 of file color_scheme.h.
const WORD paramkit::SEPARATOR_COLOR = BROWN |
Definition at line 12 of file color_scheme.h.
const WORD paramkit::WARNING_COLOR = RED |
Definition at line 8 of file color_scheme.h.