OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph::cli_interpreter Class Reference

`#include <ojph_arg.h>`

## Classes
struct | arg_inter_base

## Public Member Functions
| cli_interpreter ()
| ~cli_interpreter ()
void | init (int argc, char *argv[])
argument | get_next_value (const argument &current)
argument | find_argument (const char *str)
void | release_argument (const argument &arg)
bool | is_exhausted ()
argument | get_argument_zero ()
argument | get_next_avail_argument (const argument &arg)
void | reinterpret (const char *str, int &val)
void | reinterpret (const char *str, ui32 &val)
void | reinterpret (const char *str, float &val)
void | reinterpret (const char *str, bool &val)
bool | reinterpret (const char *str)
void | reinterpret_to_bool (const char *str, int &val)
void | reinterpret (const char *str, char *&val)
void | reinterpret (const char *str, arg_inter_base *fun)

## Private Attributes
char ** | argv
int | argc
ui8 | avail_store [16]
ui8 * | avail

## Detailed Description

Definition at line 66 of file ojph_arg.h.

## Constructor & Destructor Documentation

## ◆ cli_interpreter()

ojph::cli_interpreter::cli_interpreter | ( |  | ) |
| inline

Definition at line 68 of file ojph_arg.h.

References argc, argv, avail, and avail_store.

## ◆ ~cli_interpreter()

ojph::cli_interpreter::~cli_interpreter | ( |  | ) |
| inline

Definition at line 69 of file ojph_arg.h.

References avail, and avail_store.

## Member Function Documentation

## ◆ find_argument()

argument ojph::cli_interpreter::find_argument | ( | const char * | str | ) |
| inline

Definition at line 97 of file ojph_arg.h.

References ojph::argument::arg, argc, argv, avail, and ojph::argument::index.

Referenced by reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), and reinterpret_to_bool().

## ◆ get_argument_zero()

argument ojph::cli_interpreter::get_argument_zero | ( |  | ) |
| inline

Definition at line 126 of file ojph_arg.h.

References ojph::argument::arg, and argv.

Referenced by get_arguments(), get_arguments(), and get_arguments().

## ◆ get_next_avail_argument()

argument ojph::cli_interpreter::get_next_avail_argument | ( | const argument & | arg | ) |
| inline

Definition at line 133 of file ojph_arg.h.

References ojph::argument::arg, argc, argv, avail, and ojph::argument::index.

Referenced by get_arguments(), get_arguments(), and get_arguments().

## ◆ get_next_value()

argument ojph::cli_interpreter::get_next_value | ( | const argument & | current | ) |
| inline

Definition at line 86 of file ojph_arg.h.

References ojph::argument::arg, argc, argv, avail, and ojph::argument::index.

Referenced by reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), and reinterpret_to_bool().

## ◆ init()

void ojph::cli_interpreter::init | ( | int | argc,
|  | char * | argv[] )
| inline

Definition at line 73 of file ojph_arg.h.

References argc, argv, avail, avail_store, and ojph_max.

Referenced by get_arguments(), get_arguments(), and get_arguments().

## ◆ is_exhausted()

bool ojph::cli_interpreter::is_exhausted | ( |  | ) |
| inline

Definition at line 118 of file ojph_arg.h.

References argc, and avail.

Referenced by get_arguments(), get_arguments(), and get_arguments().

## ◆ reinterpret() [1/7]

bool ojph::cli_interpreter::reinterpret | ( | const char * | str | ) |
| inline

Definition at line 205 of file ojph_arg.h.

References find_argument(), ojph::argument::is_valid(), and release_argument().

## ◆ reinterpret() [2/7]

void ojph::cli_interpreter::reinterpret | ( | const char * | str,
|  | arg_inter_base * | fun )
| inline

Definition at line 252 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), ojph::cli_interpreter::arg_inter_base::operate(), and release_argument().

## ◆ reinterpret() [3/7]

void ojph::cli_interpreter::reinterpret | ( | const char * | str,
|  | bool & | val )
| inline

Definition at line 185 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), and release_argument().

## ◆ reinterpret() [4/7]

void ojph::cli_interpreter::reinterpret | ( | const char * | str,
|  | char *& | val )
| inline

Definition at line 236 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), and release_argument().

## ◆ reinterpret() [5/7]

void ojph::cli_interpreter::reinterpret | ( | const char * | str,
|  | float & | val )
| inline

Definition at line 172 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), and release_argument().

## ◆ reinterpret() [6/7]

void ojph::cli_interpreter::reinterpret | ( | const char * | str,
|  | int & | val )
| inline

Definition at line 146 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), and release_argument().

Referenced by get_arguments(), get_arguments(), and get_arguments().

## ◆ reinterpret() [7/7]

void ojph::cli_interpreter::reinterpret | ( | const char * | str,
|  | ui32 & | val )
| inline

Definition at line 159 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), and release_argument().

## ◆ reinterpret_to_bool()

void ojph::cli_interpreter::reinterpret_to_bool | ( | const char * | str,
|  | int & | val )
| inline

Definition at line 216 of file ojph_arg.h.

References ojph::argument::arg, find_argument(), get_next_value(), ojph::argument::is_valid(), and release_argument().

Referenced by get_arguments().

## ◆ release_argument()

void ojph::cli_interpreter::release_argument | ( | const argument & | arg | ) |
| inline

Definition at line 110 of file ojph_arg.h.

References argc, avail, and ojph::argument::index.

Referenced by reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), reinterpret(), and reinterpret_to_bool().

## Member Data Documentation

## ◆ argc

int ojph::cli_interpreter::argc
| private

Definition at line 266 of file ojph_arg.h.

Referenced by cli_interpreter(), find_argument(), get_next_avail_argument(), get_next_value(), init(), is_exhausted(), and release_argument().

## ◆ argv

char** ojph::cli_interpreter::argv
| private

Definition at line 265 of file ojph_arg.h.

Referenced by cli_interpreter(), find_argument(), get_argument_zero(), get_next_avail_argument(), get_next_value(), and init().

## ◆ avail

ui8* ojph::cli_interpreter::avail
| private

Definition at line 268 of file ojph_arg.h.

Referenced by cli_interpreter(), find_argument(), get_next_avail_argument(), get_next_value(), init(), is_exhausted(), release_argument(), and ~cli_interpreter().

## ◆ avail_store

ui8 ojph::cli_interpreter::avail_store[16]
| private

Definition at line 267 of file ojph_arg.h.

Referenced by cli_interpreter(), init(), and ~cli_interpreter().

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

- /build/openjph/src/OpenJPH/src/core/openjph/ojph_arg.h