OpenJPH
Open-source implementation of JPEG2000 Part-15
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)
 
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]
 
ui8avail
 

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.

◆ ~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(), 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_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_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(), 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().

◆ 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().

◆ reinterpret() [1/6]

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

◆ reinterpret() [2/6]

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

◆ reinterpret() [3/6]

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

◆ reinterpret() [4/6]

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

◆ reinterpret() [5/6]

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

◆ reinterpret() [6/6]

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

◆ reinterpret_to_bool()

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

◆ 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(), and reinterpret_to_bool().

Member Data Documentation

◆ argc

int ojph::cli_interpreter::argc
private

◆ argv

char** ojph::cli_interpreter::argv
private

◆ avail

ui8* ojph::cli_interpreter::avail
private

◆ avail_store

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

Definition at line 256 of file ojph_arg.h.

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


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