Darknet/YOLO v3.0-177-gfa2353b
Object Detection Framework
 
Loading...
Searching...
No Matches
Darknet::ArgsAndParms Class Referencefinal

#include "darknet_args_and_parms.hpp"

Collaboration diagram for Darknet::ArgsAndParms:

Public Types

enum class  EType {
  kInvalid ,
  kCommand ,
  kFunction ,
  kParameter
}
 

Public Member Functions

 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.
 

Public Attributes

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.
 

Member Enumeration Documentation

◆ EType

enum class Darknet::ArgsAndParms::EType
strong
Enumerator
kInvalid 
kCommand 
kFunction 
kParameter 

Constructor & Destructor Documentation

◆ ~ArgsAndParms()

Darknet::ArgsAndParms::~ArgsAndParms ( )

Destructor.

◆ 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]n1is the argument name.
[in]n2is an alternate name or spelling. This may be blank if there are no alternate spellings.
[in]txtis 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]n1is the command or function name.
[in]tsets the parameter type.
[in]txtis 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]n1is the argument name.
[in]n2is an alternate name or spelling. This may be blank if there are no alternate spellings.
[in]iis the default value to use for this parameter.
[in]txtis 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]n1is the argument name.
[in]n2is an alternate name or spelling. This may be blank if there are no alternate spellings.
[in]fis the default value to use for this parameter.
[in]txtis 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]n1is the argument name.
[in]n2is an alternate name or spelling. This may be blank if there are no alternate spellings.
[in]stris the default value to use for this parameter.
[in]txtis a short text description for this parameter.

Member Function Documentation

◆ operator<()

bool Darknet::ArgsAndParms::operator< ( const ArgsAndParms rhs) const
inline

Needed to store these objects in an ordered set.

Member Data Documentation

◆ 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: