ITS.Propagation.LFMF 1.1
Part of the NTIA/ITS Propagation Library
Loading...
Searching...
No Matches
Driver.h
Go to the documentation of this file.
1
4#pragma once
5
6
8#include "LFMF.h"
9#include "ReturnCodes.h"
10#include "Structs.h"
11
12#include <iomanip> // for std::left, std::setw
13#include <iostream> // for std::cout
14#include <ostream> // for std::endl, std::ostream
15#include <string> // for std::string
16
18// Macros
19
21#define PRINT << std::endl << std::left << std::setw(30) <<
23#define SETW13 << std::setw(13) <<
24
26// Library Namespace
27using namespace ITS::Propagation::LFMF;
28
30// Functions
31void Help(std::ostream &os = std::cout);
32DrvrReturnCode ParseArguments(int argc, char **argv, DrvrParams &params);
34
35// Driver Utils
36std::string GetDatetimeString();
37DrvrReturnCode ParseBoolean(const std::string &str, bool &value);
38DrvrReturnCode ParseDouble(const std::string &str, double &value);
39DrvrReturnCode ParseInteger(const std::string &str, int &value);
40void PrintLabel(std::ostream &os, const std::string &lbl);
41void StringToLower(std::string &str);
42void Version(std::ostream &os = std::cout);
43
44// LFMF Model
45ReturnCode CallLFMFModel(LFMFParams &lfmf_params, Result &result);
47 ParseLFMFInputFile(const std::string &in_file, LFMFParams &lfmf_params);
48void WriteLFMFInputs(std::ofstream &fp, const LFMFParams &params);
49void WriteLFMFOutputs(std::ofstream &fp, const Result &result);
Iterator class for reading comma-delimited input text streams.
DrvrReturnCode ValidateInputs(const DrvrParams &params)
Validate that required inputs are present for the mode specified by the user.
Definition Driver.cpp:174
std::string GetDatetimeString()
Get a string containing the current date and time information.
Definition DriverUtils.cpp:30
DrvrReturnCode ParseDouble(const std::string &str, double &value)
Parse a double value read from the input parameter file.
Definition DriverUtils.cpp:82
DrvrReturnCode ParseLFMFInputFile(const std::string &in_file, LFMFParams &lfmf_params)
Parse LFMF Model input parameter file.
Definition LFMFModel.cpp:126
void PrintLabel(std::ostream &os, const std::string &lbl)
Helper function to standardize printing of text labels to file.
Definition DriverUtils.cpp:123
DrvrReturnCode ParseInteger(const std::string &str, int &value)
Parse an integer value read from the input parameter file.
Definition DriverUtils.cpp:100
void WriteLFMFInputs(std::ofstream &fp, const LFMFParams &params)
Write LFMF Model inputs to the report file.
Definition LFMFModel.cpp:141
ReturnCode CallLFMFModel(LFMFParams &lfmf_params, Result &result)
Top-level control function for LFMF Model.
Definition LFMFModel.cpp:32
void Help(std::ostream &os=std::cout)
Print help instructions to the terminal.
Definition Driver.cpp:149
DrvrReturnCode ParseBoolean(const std::string &str, bool &value)
Parse a boolean value read from the input parameter file.
Definition DriverUtils.cpp:58
void Version(std::ostream &os=std::cout)
Print version information to the specified output stream.
Definition DriverUtils.cpp:144
void WriteLFMFOutputs(std::ofstream &fp, const Result &result)
Write LFMF Model outputs to the report file.
Definition LFMFModel.cpp:160
void StringToLower(std::string &str)
Convert a string to lowercase.
Definition DriverUtils.cpp:133
DrvrReturnCode ParseArguments(int argc, char **argv, DrvrParams &params)
Parse the command line arguments.
Definition Driver.cpp:99
Interface header for this library.
ReturnCode
Return Codes defined by this software (0-127)
Definition LFMF.h:87
Defines return codes for the driver.
DrvrReturnCode
Return Codes defined by this driver software (128-255)
Definition ReturnCodes.h:12
Contains data structures and type macros used by this software.
Parameters provided to the command line driver.
Definition Structs.h:12
Structure to hold LF/MF model outputs.
Definition LFMF.h:117
Input parameters for the LFMF Model.
Definition Structs.h:19
Privacy Policy FOIA Accessibility Information Quality