1 #ifndef _readInputFunctions_h_ 2 #define _readInputFunctions_h_ 13 void searchVar(std::ifstream &stream, std::string search);
14 void checkIfOpen(std::ifstream &stream, std::string fileName);
15 void checkIfOpen(std::ofstream &stream, std::string fileName);
16 void getCords(std::ifstream & stream,
double *outAry,
int nPoly,
int nVertices);
26 void get2dAry(std::ifstream &stream, T *var,
int rowSize){
29 for (i = 0; i < rowSize; i++) {
31 stream >> ch >> var[x] >> ch >> var[x+1] >> ch >> var [x+2] >>ch;
42 void getInputAry(std::ifstream &stream, T *var,
int nElements){
45 for (i = 0; i < nElements; i++) {
46 stream >> ch >> var[i];
57 void printAry(T *var, std::string varName,
int nElements){
60 std::cout << varName <<
" = {";
61 for (i = 0; i < nElements; i++){
62 std::cout << var[i] <<
", ";
64 std::cout << var[nElements] <<
"}\n";
75 void print2dAry(T *var, std::string varName,
int rowSize) {
77 std::cout << varName <<
" :\n";
78 for(i = 0; i<rowSize; i++) {
80 std::cout <<
"{" << var[x] <<
", " << var[x+1] <<
", " << var[x+2] <<
"}\n";
91 void getElements(std::ifstream &stream, T *var,
int nElements){
93 for(i=0; i<nElements; i++) {
98 void getRectCoords(std::ifstream &stream,
double *var,
int nRectangles);
99 void printRectCoords(
double *var, std::string varName,
int nRectangles);