Go to the documentation of this file.
80 for (
int i = 0; i <
argc; ++i)
81 avail[i >> 3] |= (
ui8)(1 << (i & 7));
87 int idx = current.
index + 1;
88 if (idx <
argc && (
avail[idx >> 3] & (1 << (idx & 0x7)))) {
98 for (
int index = 1; index <
argc; ++index)
99 if (
avail[index >> 3] & (1 << (index & 0x7)))
100 if (strcmp(str,
argv[index]) == 0) {
110 if (arg.
index != 0) {
118 for (
int i = 1; i <
argc; ++i)
119 if (
avail[i >> 3] & (1 << (i & 0x7)))
134 int idx = arg.
index + 1;
135 while (idx <
argc && (
avail[idx >> 3] & (1 << (idx & 0x7))) == 0)
163 val = strtof(t2.
arg, NULL);
176 if (strcmp(t2.
arg,
"false") == 0) {
181 else if (strcmp(t2.
arg,
"true") == 0) {
196 if (strcmp(t2.
arg,
"false") == 0) {
201 else if (strcmp(t2.
arg,
"true") == 0) {
247 #endif // !OJPH_ARG_H
char * arg
Definition: ojph_arg.h:57
int index
Definition: ojph_arg.h:60
ui8 * avail
Definition: ojph_arg.h:243
uint8_t ui8
Definition: ojph_defs.h:49
argument()
Definition: ojph_arg.h:56
argument get_next_avail_argument(const argument &arg)
Definition: ojph_arg.h:132
void reinterpret(const char *str, int &val)
Definition: ojph_arg.h:145
bool is_valid()
Definition: ojph_arg.h:58
void reinterpret(const char *str, bool &val)
Definition: ojph_arg.h:171
argument get_argument_zero()
Definition: ojph_arg.h:125
argument find_argument(const char *str)
Definition: ojph_arg.h:96
Definition: ojph_arg.h:53
void reinterpret_to_bool(const char *str, int &val)
Definition: ojph_arg.h:191
void reinterpret(const char *str, char *&val)
Definition: ojph_arg.h:211
void release_argument(const argument &arg)
Definition: ojph_arg.h:109
virtual void operate(const char *)=0
void init(int argc, char *argv[])
Definition: ojph_arg.h:73
ui8 avail_store[16]
Definition: ojph_arg.h:242
int argc
Definition: ojph_arg.h:241
#define ojph_max(a, b)
Definition: ojph_defs.h:77
bool is_exhausted()
Definition: ojph_arg.h:117
Definition: ojph_arg.h:224
Definition: ojph_block_decoder.h:44
cli_interpreter()
Definition: ojph_arg.h:68
argument get_next_value(const argument ¤t)
Definition: ojph_arg.h:85
char ** argv
Definition: ojph_arg.h:240
~cli_interpreter()
Definition: ojph_arg.h:69
Definition: ojph_arg.h:66
void reinterpret(const char *str, arg_inter_base *fun)
Definition: ojph_arg.h:227
void reinterpret(const char *str, float &val)
Definition: ojph_arg.h:158