|
DFNgen
2.0
DFN Model Generator
|
#include "readInputFunctions.h"#include <cstdlib>#include <chrono>#include <fstream>#include <string>
Go to the source code of this file.
Functions | |
| void | searchVar (std::ifstream &stream, std::string search) |
| void | checkIfOpen (std::ifstream &stream, std::string fileName) |
| void | checkIfOpen (std::ofstream &stream, std::string fileName) |
| void | getRectCoords (std::ifstream &stream, double *var, int nRectangles) |
| void | getCords (std::ifstream &stream, double *outAry, int nPoly, int nVertices) |
| void | printRectCoords (double *var, std::string varName, int nRectangles) |
| unsigned int | getTimeBasedSeed () |
| void checkIfOpen | ( | std::ifstream & | stream, |
| std::string | fileName | ||
| ) |
Checks file for being opened correectly with error msg Arg 1: ifstream file object Arg 2: Filename. Used for error print if there is an error
Definition at line 35 of file readInputFunctions.cpp.

| void checkIfOpen | ( | std::ofstream & | stream, |
| std::string | fileName | ||
| ) |
Definition at line 42 of file readInputFunctions.cpp.
| void getCords | ( | std::ifstream & | stream, |
| double * | outAry, | ||
| int | nPoly, | ||
| int | nVertices | ||
| ) |
Used to read in ellipse coordinates when the user is using user ellipses defined by coordinates option. Arg 1: ifstream file object Arg 2: OUTPUT. Pointer to array to store the coordinates Arg 3: Number of ellipses Arg 4: Number of points per ellipse
Definition at line 77 of file readInputFunctions.cpp.

| void getRectCoords | ( | std::ifstream & | stream, |
| double * | var, | ||
| int | nRectangles | ||
| ) |
Used to read in rectangualr coordinates when the user is using user rectangles defined by coordinates option. Arg 1: ifstream file object Arg 2: OUTPUT. Pointer to array to store the coordinates Arg 3: Number of rectangles
Definition at line 56 of file readInputFunctions.cpp.

| unsigned int getTimeBasedSeed | ( | ) |
Gets time based seed Return: Seed based on the system clock
Definition at line 112 of file readInputFunctions.cpp.

| void printRectCoords | ( | double * | var, |
| std::string | varName, | ||
| int | nRectangles | ||
| ) |
Prints rectangular coordinates. Useful for debugging. Arg 1: Array that stored all rectangular coordinates. Arg 2: Variable name Arg 3: Number of rectangles
Definition at line 95 of file readInputFunctions.cpp.

| void searchVar | ( | std::ifstream & | stream, |
| std::string | search | ||
| ) |
Searches for variable in files, moves file pointer to position after word. Used to read in varlable values Arg 1: ifstream file object Arg 2: Word to search for
Definition at line 14 of file readInputFunctions.cpp.
