ITS.ITU.PSeries.P2108 1.0
Part of the NTIA/ITS Propagation Library
Loading...
Searching...
No Matches
DriverUtils.cpp File Reference

Implements various model-agnostic utility functions for the driver. More...

Functions

std::string GetDatetimeString ()
 Get a string containing the current date and time information.
 
DrvrReturnCode ParseBoolean (const std::string &str, bool &value)
 Parse a boolean value read from the input parameter file.
 
DrvrReturnCode ParseDouble (const std::string &str, double &value)
 Parse a double value read from the input parameter file.
 
DrvrReturnCode ParseInteger (const std::string &str, int &value)
 Parse an integer value read from the input parameter file.
 
void PrintLabel (std::ostream &os, const std::string &lbl)
 Helper function to standardize printing of text labels to file.
 
void StringToLower (std::string &str)
 Convert a string to lowercase.
 
void Version (std::ostream &os)
 Print version information to the specified output stream.
 

Detailed Description

Implements various model-agnostic utility functions for the driver.

Function Documentation

◆ GetDatetimeString()

std::string GetDatetimeString ( )

Get a string containing the current date and time information.

Returns
A localized standard date and time string (locale dependent)

◆ ParseBoolean()

DrvrReturnCode ParseBoolean ( const std::string & str,
bool & value )

Parse a boolean value read from the input parameter file.

Supports either "true" or "false" (case-insensitive) or "0" or "1"

Parameters
[in]strInput file value as string
[out]valueInput file value converted to bool
Returns
Return code

◆ ParseDouble()

DrvrReturnCode ParseDouble ( const std::string & str,
double & value )

Parse a double value read from the input parameter file.

Parameters
[in]strInput file value as string
[out]valueInput file value converted to double
Returns
Return code

◆ ParseInteger()

DrvrReturnCode ParseInteger ( const std::string & str,
int & value )

Parse an integer value read from the input parameter file.

Parameters
[in]strInput file value as string
[out]valueInput file value converted to int
Returns
Return code

◆ PrintLabel()

void PrintLabel ( std::ostream & os,
const std::string & lbl )

Helper function to standardize printing of text labels to file.

Parameters
[in]osOutput stream for writing
[in]lblText message

◆ StringToLower()

void StringToLower ( std::string & str)

Convert a string to lowercase.

Parameters
[in,out]strThe string to convert

◆ Version()

void Version ( std::ostream & os)

Print version information to the specified output stream.

Parameters
[in]osOutput stream for writing; defaults to std::cout
Privacy Policy FOIA Accessibility Information Quality