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

Each non-empty line in a .cfg file is stored as a Darknet::CfgLine object. More...

#include "darknet_cfg.hpp"

Collaboration diagram for Darknet::CfgLine:

Public Member Functions

 CfgLine ()
 Consructor.
 
 CfgLine (const std::string &l, const size_t ln, const std::string &lhs, const std::string &rhs)
 Consructor.
 
 ~CfgLine ()
 Destructor.
 
CfgLineclear ()
 Reset the line to be empty.
 
std::string debug () const
 Create a text message describing what we know about this line.
 
bool empty () const
 Determine if a line is empty.
 

Public Attributes

std::optional< float > f
 If val is a single numeric value, it will be stored here.
 
std::string key
 The text that comes on the left side of the "=".
 
std::string line
 Original line of text.
 
size_t line_number
 The line number within the .cfg file.
 
bool used
 Remember if this line was consumed when the configuraiton was parsed.
 
std::string val
 The text that comes on the right side of the "=".
 

Detailed Description

Each non-empty line in a .cfg file is stored as a Darknet::CfgLine object.

These line objects are stored in Darknet::CfgSection::lines.

Constructor & Destructor Documentation

◆ CfgLine() [1/2]

Darknet::CfgLine::CfgLine ( )

Consructor.

◆ CfgLine() [2/2]

Darknet::CfgLine::CfgLine ( const std::string &  l,
const size_t  ln,
const std::string &  lhs,
const std::string &  rhs 
)

Consructor.

Here is the call graph for this function:

◆ ~CfgLine()

Darknet::CfgLine::~CfgLine ( )

Destructor.

Member Function Documentation

◆ clear()

Darknet::CfgLine & Darknet::CfgLine::clear ( )

Reset the line to be empty.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug()

std::string Darknet::CfgLine::debug ( ) const

Create a text message describing what we know about this line.

◆ empty()

bool Darknet::CfgLine::empty ( ) const
inline

Determine if a line is empty.

Member Data Documentation

◆ f

std::optional<float> Darknet::CfgLine::f

If val is a single numeric value, it will be stored here.

◆ key

std::string Darknet::CfgLine::key

The text that comes on the left side of the "=".

◆ line

std::string Darknet::CfgLine::line

Original line of text.

◆ line_number

size_t Darknet::CfgLine::line_number

The line number within the .cfg file.

◆ used

bool Darknet::CfgLine::used

Remember if this line was consumed when the configuraiton was parsed.

See also
Darknet::CfgSection::find_unused_lines()

◆ val

std::string Darknet::CfgLine::val

The text that comes on the right side of the "=".


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