ONE - On-device Neural Engine
|
this class describes a common command line interface More...
#include <CommandLine.h>
Public Member Functions | |
CommandLine (const CommandLine &)=delete | |
CommandLine & | operator= (const CommandLine &)=delete |
void | parseCommandLine (int argc, const char **argv, bool check_nonoptional=true) |
parse command line option | |
void | registerOption (IOption *opt) |
register option for parser | |
Static Public Member Functions | |
static CommandLine * | getParser () |
singleton method | |
this class describes a common command line interface
Definition at line 304 of file CommandLine.h.
|
delete |
|
static |
singleton method
Definition at line 106 of file CommandLine.cpp.
Referenced by main(), main(), nnc::cli::Option< T >::Option(), and TEST().
|
delete |
void nnc::cli::CommandLine::parseCommandLine | ( | int | argc, |
const char ** | argv, | ||
bool | check_nonoptional = true |
||
) |
parse command line option
argc | - number of command line arguments |
argv | - command line arguments |
check_nonoptional | - if true then check that all non optional declared options are presented |
Definition at line 466 of file CommandLine.cpp.
References nnc::cli::IOption::canHaveSeveralVals(), nnc::cli::BadOption::getName(), nnc::cli::IOption::getNames(), nnc::cli::BadOption::getValue(), nnc::cli::optname(), and nnc::cli::IOption::setValue().
void nnc::cli::CommandLine::registerOption | ( | IOption * | opt | ) |
register option for parser
opt | - option |
Definition at line 199 of file CommandLine.cpp.
References nnc::cli::IOption::getGroup(), nnc::cli::IOption::getNames(), and nnc::cli::IOption::isGrouped().
Referenced by nnc::cli::Option< T >::Option().