#include "darknet_args_and_parms.hpp"
|
| ArgsAndParms () |
| Default constructor is needed for std::map.
|
|
| ArgsAndParms (const std::string &n1, const EType t, const std::string &txt="") |
| Constructor.
|
|
| ArgsAndParms (const std::string &n1, const std::string &n2, const float f, const std::string &txt="") |
| Constructor.
|
|
| ArgsAndParms (const std::string &n1, const std::string &n2, const int i, const std::string &txt="") |
| Constructor.
|
|
| ArgsAndParms (const std::string &n1, const std::string &n2, const std::string &str, const std::string &txt) |
| Constructor.
|
|
| ArgsAndParms (const std::string &n1, const std::string &n2="", const std::string &txt="") |
| Constructor.
|
|
| ~ArgsAndParms () |
| Destructor.
|
|
bool | operator< (const ArgsAndParms &rhs) const |
| Needed to store these objects in an ordered set.
|
|
|
int | arg_index |
| The argument index into argv[].
|
|
std::string | description |
|
bool | expect_parm |
| If an additional parameter is expected. For example, "--threshold" should be followed by a number.
|
|
std::filesystem::path | filename |
| If this parameter is a filename, or the value is a filename, the path is stored here.
|
|
std::string | name |
| The name of the argument or command. For example, this could be "dontshow" or "version" .
|
|
std::string | name_alternate |
| If the argument or command has an alternate spelling. For example, this could be "color" (vs "colour" ).
|
|
std::string | str |
| If expect_parm is true , then this would be the text string that comes next.
|
|
EType | type |
|
float | value |
| If expect_parm is true , then this would be the numeric value that comes next.
|
|
◆ EType
Enumerator |
---|
kInvalid | |
kCommand | |
kFunction | |
kParameter | |
◆ ~ArgsAndParms()
Darknet::ArgsAndParms::~ArgsAndParms |
( |
| ) |
|
◆ ArgsAndParms() [1/6]
Darknet::ArgsAndParms::ArgsAndParms |
( |
| ) |
|
Default constructor is needed for std::map.
◆ ArgsAndParms() [2/6]
Darknet::ArgsAndParms::ArgsAndParms |
( |
const std::string & |
n1, |
|
|
const std::string & |
n2 = "" , |
|
|
const std::string & |
txt = "" |
|
) |
| |
Constructor.
- Parameters
-
[in] | n1 | is the argument name. |
[in] | n2 | is an alternate name or spelling. This may be blank if there are no alternate spellings. |
[in] | txt | is a short text description for this parameter. |
◆ ArgsAndParms() [3/6]
Darknet::ArgsAndParms::ArgsAndParms |
( |
const std::string & |
n1, |
|
|
const EType |
t, |
|
|
const std::string & |
txt = "" |
|
) |
| |
Constructor.
This is mostly used for commands and functions, not parameters.
- Parameters
-
[in] | n1 | is the command or function name. |
[in] | t | sets the parameter type. |
[in] | txt | is a short text description for this parameter. |
◆ ArgsAndParms() [4/6]
Darknet::ArgsAndParms::ArgsAndParms |
( |
const std::string & |
n1, |
|
|
const std::string & |
n2, |
|
|
const int |
i, |
|
|
const std::string & |
txt = "" |
|
) |
| |
Constructor.
This parameter requires the next argument be an int
parameter.
- Parameters
-
[in] | n1 | is the argument name. |
[in] | n2 | is an alternate name or spelling. This may be blank if there are no alternate spellings. |
[in] | i | is the default value to use for this parameter. |
[in] | txt | is a short text description for this parameter. |
◆ ArgsAndParms() [5/6]
Darknet::ArgsAndParms::ArgsAndParms |
( |
const std::string & |
n1, |
|
|
const std::string & |
n2, |
|
|
const float |
f, |
|
|
const std::string & |
txt = "" |
|
) |
| |
Constructor.
This parameter requires the next argument be a float
parameter.
- Parameters
-
[in] | n1 | is the argument name. |
[in] | n2 | is an alternate name or spelling. This may be blank if there are no alternate spellings. |
[in] | f | is the default value to use for this parameter. |
[in] | txt | is a short text description for this parameter. |
◆ ArgsAndParms() [6/6]
Darknet::ArgsAndParms::ArgsAndParms |
( |
const std::string & |
n1, |
|
|
const std::string & |
n2, |
|
|
const std::string & |
str, |
|
|
const std::string & |
txt |
|
) |
| |
Constructor.
This parameter requires the next argument be a string
parameter.
- Parameters
-
[in] | n1 | is the argument name. |
[in] | n2 | is an alternate name or spelling. This may be blank if there are no alternate spellings. |
[in] | str | is the default value to use for this parameter. |
[in] | txt | is a short text description for this parameter. |
◆ operator<()
bool Darknet::ArgsAndParms::operator< |
( |
const ArgsAndParms & |
rhs | ) |
const |
|
inline |
Needed to store these objects in an ordered set.
◆ arg_index
int Darknet::ArgsAndParms::arg_index |
The argument index into argv[].
◆ description
std::string Darknet::ArgsAndParms::description |
◆ expect_parm
bool Darknet::ArgsAndParms::expect_parm |
If an additional parameter is expected. For example, "--threshold"
should be followed by a number.
◆ filename
std::filesystem::path Darknet::ArgsAndParms::filename |
If this parameter is a filename, or the value is a filename, the path is stored here.
◆ name
std::string Darknet::ArgsAndParms::name |
The name of the argument or command. For example, this could be "dontshow"
or "version"
.
◆ name_alternate
std::string Darknet::ArgsAndParms::name_alternate |
If the argument or command has an alternate spelling. For example, this could be "color"
(vs "colour"
).
◆ str
std::string Darknet::ArgsAndParms::str |
If expect_parm
is true
, then this would be the text string that comes next.
◆ type
EType Darknet::ArgsAndParms::type |
◆ value
float Darknet::ArgsAndParms::value |
If expect_parm
is true
, then this would be the numeric value that comes next.
The documentation for this class was generated from the following files: