Darknet/YOLO v3.0-149-gb11c9d5
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="")
 
 ArgsAndParms (const std::string &n1, const std::string &n2, const float f, const std::string &txt="")
 Constructor. Next argument must be a float parameter.
 
 ArgsAndParms (const std::string &n1, const std::string &n2, const int i, const std::string &txt="")
 Constructor. Next argument must be an int parameter.
 
 ArgsAndParms (const std::string &n1, const std::string &n2="", const std::string &txt="")
 Constructor. n1 is the argument name, while n2 is an alternate name or spelling.
 
 ~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").
 
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/5]

Darknet::ArgsAndParms::ArgsAndParms ( )

Default constructor is needed for std::map.

◆ ArgsAndParms() [2/5]

Darknet::ArgsAndParms::ArgsAndParms ( const std::string &  n1,
const std::string &  n2 = "",
const std::string &  txt = "" 
)

Constructor. n1 is the argument name, while n2 is an alternate name or spelling.

◆ ArgsAndParms() [3/5]

Darknet::ArgsAndParms::ArgsAndParms ( const std::string &  n1,
const EType  t,
const std::string &  txt = "" 
)

◆ ArgsAndParms() [4/5]

Darknet::ArgsAndParms::ArgsAndParms ( const std::string &  n1,
const std::string &  n2,
const int  i,
const std::string &  txt = "" 
)

Constructor. Next argument must be an int parameter.

◆ ArgsAndParms() [5/5]

Darknet::ArgsAndParms::ArgsAndParms ( const std::string &  n1,
const std::string &  n2,
const float  f,
const std::string &  txt = "" 
)

Constructor. Next argument must be a float 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").

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