Each non-empty line in a .cfg file is stored as a
Darknet::CfgLine
object.
More...
#include "darknet_cfg.hpp"
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. | |
CfgLine & | clear () |
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 "=" . | |
Each non-empty line in a .cfg file is stored as a
Darknet::CfgLine
object.
These line objects are stored in Darknet::CfgSection::lines.
Darknet::CfgLine::CfgLine | ( | ) |
Consructor.
Darknet::CfgLine::CfgLine | ( | const std::string & | l, |
const size_t | ln, | ||
const std::string & | lhs, | ||
const std::string & | rhs | ||
) |
Consructor.
Darknet::CfgLine::~CfgLine | ( | ) |
Destructor.
Darknet::CfgLine & Darknet::CfgLine::clear | ( | ) |
Reset the line to be empty.
std::string Darknet::CfgLine::debug | ( | ) | const |
Create a text message describing what we know about this line.
|
inline |
Determine if a line is empty.
std::optional<float> Darknet::CfgLine::f |
If val is a single numeric value, it will be stored here.
std::string Darknet::CfgLine::key |
The text that comes on the left side of the "="
.
std::string Darknet::CfgLine::line |
Original line of text.
size_t Darknet::CfgLine::line_number |
The line number within the .cfg file.
bool Darknet::CfgLine::used |
Remember if this line was consumed when the configuraiton was parsed.
std::string Darknet::CfgLine::val |
The text that comes on the right side of the "="
.