1 #ifndef _CONSOLEPARSE_H
2 #define _CONSOLEPARSE_H
22 #define MAX_CLI_LEN 512
23 #define MAX_TOKEN_LENGTH 255
60 : found_token(found_str), expected_type(expected_dct)
84 expected_tokens.push_back(str);
97 expected_tokens.push_back(str1);
98 expected_tokens.push_back(str2);
460 #endif // _CONSOLEPARSE_H
void dc_stuff_ubyte(ubyte *i)
Stuffs an unsigned byte to the given variable. Supports binary (0b), hexadecimal (0x), and octal (0o) formats.
bool dc_maybe_stuff_int(int *i)
Tries to stuff an int from the Command_string.
bool dc_maybe_stuff_float(float *f)
Tries to stuff a float from the Command_string.
errParseOverflow(const char *found_str, size_t _len)
void dc_ignore_white_space(void)
Advances the parser past whitespace characters.
Class thrown when the parsed string or token could not be stuffed into the smaller destination contai...
void dc_stuff_int(int *i)
Stuffs an int to the given variable. Supports binary (0b), hexadecimal (0x), and octal (0o) formats...
void dc_stuff_float(float *f)
Stuffs a float to the given variable.
errParseString(const char *found_str, char *str)
Invalid/Unexpected token constructor.
Integral or string evaluated as a boolean.
bool dc_maybe_stuff_boolean(bool *b)
Tries to stuff a bool from the Command_string.
Class thrown when a required token is not found.
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
bool dc_optional_string_either(const char *str1, const char *str2)
Searches for an optional string and it's alias.
bool dc_optional_string(const char *pstr)
Searches for an optional string.
errParseString(const char *found_str, SCP_vector< SCP_string > &strings)
Invalid/Unexpected token constructor.
int dc_required_string_either(char *str1, char *str2)
Searchs for either of the specified required strings, throwing an errParse if neither are found...
bool dc_maybe_stuff_uint(uint *i)
Tries to stuff an uint from the Command_string.
void dc_stuff_string_white(char *str, size_t len)
Stuffs a whitespace delimited string to out_str from the command line, stopping at the end of the com...
Maximum number of dc_token elements. Primarily used as an end value in loops.
Integral with values between -128 and 127.
errParseString(const char *found_str, char *str1, char *str2)
Invalid/Unexpected token constructor.
void dc_parse_init(SCP_string &str)
Initializes the DC command line parser.
void dc_ignore_gray_space(void)
Advances the parser past grayspace characters.
void dc_stuff_boolean(bool *b)
stuffs a boolean evaluated integer or string into the given variable.
bool dc_maybe_stuff_ubyte(ubyte *i)
Tries to stuff an ubyte from the Command_string.
Integral with values between 0 and 255.
SCP_vector< SCP_string > expected_tokens
Class thrown when an expected string was not found. Can/should contain all of the expected strings...
GLboolean GLboolean GLboolean b
void dc_stuff_uint(uint *i)
Stuffs an unsigned int to the given variable. Supports binary (0b), hexadecimal (0x), and octal (0o) formats.
errParse(const char *found_str, dc_token expected_dct)
Invalid/Unexpected token constructor.
void dc_stuff_string(char *str, size_t maxlen)
Stuffs a string to out_str from the command line, stopping at the end of the command line...
An overhauled/updated debug console to allow monitoring, testing, and general debugging of new featur...
void dc_required_string(char *pstr)
Searches for a specified required string, throwing an errParse if not found.
bool dc_maybe_stuff_string(char *str, size_t len)
Tries to stuff a string to out_str from the command line, stopping at the end of the command line...
GLsizei const GLchar ** strings
bool dc_maybe_stuff_string_white(char *str, size_t len)
Tries to stuff a whitespace delimited string to out_str from the command line, stopping at the end of...
size_t len
The size of the destination container.
uint dc_required_string_any(const uint n,...)
Searches for specified required strings.