81 for (
int i = 0; i <
argc; ++i)
88 int idx = current.
index + 1;
89 if (idx <
argc && (
avail[idx >> 3] & (1 << (idx & 0x7)))) {
99 for (
int index = 1; index <
argc; ++index)
100 if (
avail[index >> 3] & (1 << (index & 0x7)))
101 if (strcmp(str,
argv[index]) == 0) {
111 if (arg.
index != 0) {
119 for (
int i = 1; i <
argc; ++i)
120 if (
avail[i >> 3] & (1 << (i & 0x7)))
135 int idx = arg.
index + 1;
136 while (idx <
argc && (
avail[idx >> 3] & (1 << (idx & 0x7))) == 0)
164 val = (
ui32)strtoul(t2.
arg, NULL, 10);
177 val = strtof(t2.
arg, NULL);
190 if (strcmp(t2.
arg,
"false") == 0) {
195 else if (strcmp(t2.
arg,
"true") == 0) {
210 if (strcmp(t2.
arg,
"false") == 0) {
215 else if (strcmp(t2.
arg,
"true") == 0) {
Definition: ojph_arg.h:53
int index
Definition: ojph_arg.h:60
bool is_valid()
Definition: ojph_arg.h:58
argument()
Definition: ojph_arg.h:56
char * arg
Definition: ojph_arg.h:57
Definition: ojph_arg.h:66
cli_interpreter()
Definition: ojph_arg.h:68
void init(int argc, char *argv[])
Definition: ojph_arg.h:73
void reinterpret_to_bool(const char *str, int &val)
Definition: ojph_arg.h:205
void reinterpret(const char *str, int &val)
Definition: ojph_arg.h:146
ui8 * avail
Definition: ojph_arg.h:257
void reinterpret(const char *str, float &val)
Definition: ojph_arg.h:172
void release_argument(const argument &arg)
Definition: ojph_arg.h:110
bool is_exhausted()
Definition: ojph_arg.h:118
void reinterpret(const char *str, ui32 &val)
Definition: ojph_arg.h:159
argument find_argument(const char *str)
Definition: ojph_arg.h:97
void reinterpret(const char *str, bool &val)
Definition: ojph_arg.h:185
argument get_argument_zero()
Definition: ojph_arg.h:126
argument get_next_avail_argument(const argument &arg)
Definition: ojph_arg.h:133
char ** argv
Definition: ojph_arg.h:254
void reinterpret(const char *str, arg_inter_base *fun)
Definition: ojph_arg.h:241
~cli_interpreter()
Definition: ojph_arg.h:69
void reinterpret(const char *str, char *&val)
Definition: ojph_arg.h:225
ui8 avail_store[16]
Definition: ojph_arg.h:256
int argc
Definition: ojph_arg.h:255
argument get_next_value(const argument ¤t)
Definition: ojph_arg.h:86
Definition: ojph_block_decoder.cpp:49
uint32_t ui32
Definition: ojph_defs.h:54
uint8_t ui8
Definition: ojph_defs.h:50
#define ojph_max(a, b)
Definition: ojph_defs.h:73
Definition: ojph_arg.h:238
virtual void operate(const char *)=0