ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::cli::BadOption Class Reference

simple exception class for invalid options More...

#include <CommandLine.h>

Collaboration diagram for nnc::cli::BadOption:

Public Member Functions

 BadOption (const std::string &msg, std::string optname="", std::string value="")
 
const std::string & getName () const
 get name for invalid option
 
const std::string & getValue () const
 get value for invalid option
 

Detailed Description

simple exception class for invalid options

Definition at line 37 of file CommandLine.h.

Constructor & Destructor Documentation

◆ BadOption()

nnc::cli::BadOption::BadOption ( const std::string &  msg,
std::string  optname = "",
std::string  value = "" 
)
inlineexplicit

Definition at line 40 of file CommandLine.h.

41 : std::logic_error(msg), _option_name(std::move(optname)), _option_value(std::move(value))
42 {
43 }
std::vector< std::string > optname(const char *names)
convert option names for Option constructor

Member Function Documentation

◆ getName()

const std::string & nnc::cli::BadOption::getName ( ) const
inline

get name for invalid option

Definition at line 48 of file CommandLine.h.

48{ return _option_name; }

Referenced by nnc::cli::CommandLine::parseCommandLine().

◆ getValue()

const std::string & nnc::cli::BadOption::getValue ( ) const
inline

get value for invalid option

Definition at line 53 of file CommandLine.h.

53{ return _option_value; }

Referenced by nnc::cli::CommandLine::parseCommandLine().


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