lib45d
45Drives C++ Library Development Documentation
Enumerations | Functions
l Namespace Reference

Local functions used in the compiled library. More...

Enumerations

enum  RecordType { RecordType::UNK = -1, RecordType::ENTRY, RecordType::HEADING, RecordType::EMPTY }
 Types of records in config file, returned by l::check_record_type() More...
 

Functions

void strip_whitespace (std::string &str)
 Modifies str by removing whitespace from beginning and end. More...
 
void remove_comments (std::string &str)
 Modifies str by removing anything after a '#' (inclusive) More...
 
RecordType check_record_type (const std::string &record)
 Returns l::RecordType based on contents of record. More...
 

Detailed Description

Local functions used in the compiled library.

Enumeration Type Documentation

◆ RecordType

enum l::RecordType
strongprivate

Types of records in config file, returned by l::check_record_type()

Enumerator
UNK 

unknown record type

ENTRY 

"key = value" pair

HEADING 

[string] style subsection header

EMPTY 

empty string

Function Documentation

◆ check_record_type()

l::RecordType l::check_record_type ( const std::string &  record)
private

Returns l::RecordType based on contents of record.

Parameters
recordline of config file to check
Returns
RecordType

◆ remove_comments()

void l::remove_comments ( std::string &  str)
private

Modifies str by removing anything after a '#' (inclusive)

Parameters
strString to be modified

◆ strip_whitespace()

void l::strip_whitespace ( std::string &  str)
private

Modifies str by removing whitespace from beginning and end.

Parameters
strString to be modified