50 int ReadStringOption(
const string& a_input, T* ap_return,
int a_nbElts,
const string& sep,
const string& a_option)
54 size_t pos2 = a_input.find_first_of(sep, 0);
56 if (a_nbElts>1 && pos2 == string::npos)
58 Cerr(
"***** gOptions::ReadStringOption() -> Error : '" << sep <<
"' not found in option: " << a_option << endl);
63 for (
int i=0 ; i<a_nbElts ; i++)
65 string elt = a_input.substr(pos, pos2-pos);
69 Cerr(
"***** gOptions::ReadStringOption() -> Error when trying to read input data for option: " << a_option << endl);
74 pos2 = a_input.find_first_of(sep, pos);
111 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T* ap_return,
int a_nbElts,
bool a_mandatoryFlag)
113 ifstream input_file(a_file.c_str(), ios::in);
116 string sep_comment =
"#";
117 string sep_elt =
",";
122 while(!input_file.eof())
124 getline(input_file, line);
127 if (line.find(sep_comment) != string::npos) line = line.substr(0, line.find_first_of(sep_comment)) ;
129 if (line.find(a_keyword) != string::npos)
133 line = line.substr(line.find_first_of(sep)+1);
139 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
140 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
143 size_t pos2 = line.find_first_of(sep_elt, pos);
146 if (a_nbElts>1 && pos2 == string::npos)
148 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
153 for (
int i=0 ; i<a_nbElts ; i++)
158 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
159 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
164 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
168 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
175 pos = (pos2<0) ? -1 : pos2+1 ;
176 pos2 = line.find_first_of(sep_elt, pos);
185 if (a_mandatoryFlag ==
true)
187 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
197 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '"<< a_file <<
"' !" << endl);
236 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag)
238 ifstream input_file(a_file.c_str(), ios::in);
241 string sep_comment =
"#";
242 string sep_elt =
",";
247 while (!input_file.eof())
249 getline(input_file, line);
252 if (line.find(sep_comment)) line = line.substr(0, line.find_first_of(sep_comment));
254 if (line.find(a_keyword) != string::npos)
257 for (
int l=0 ; l<a_nbLines ; l++)
259 getline(input_file, line);
261 line = line.substr(line.find_first_of(sep)+1);
267 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
268 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
271 size_t pos2 = line.find_first_of(sep_elt, pos);
274 if (a_nbElts>1 && pos2 == string::npos)
276 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
281 for (
int i=0 ; i<a_nbElts ; i++)
286 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
287 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
292 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
296 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file " << a_file << endl);
302 pos = (pos2<0) ? -1 : pos2+1 ;
303 pos2 = line.find_first_of(sep_elt, pos);
312 if (a_mandatoryFlag ==
true)
314 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
324 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '" << a_file <<
"' !" << endl);
364 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag)
366 ifstream input_file(a_file.c_str(), ios::in);
369 string sep_comment =
"#";
370 string sep_elt =
",";
375 while (!input_file.eof())
377 getline(input_file, line);
380 if (line.find(sep_comment)) line = line.substr(0, line.find_first_of(sep_comment));
382 if (line.find(a_keyword) != string::npos)
385 for (
int l=0 ; l<a_nbLines ; l++)
387 getline(input_file, line);
389 line = line.substr(line.find_first_of(sep)+1);
395 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
396 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
399 size_t pos2 = line.find_first_of(sep_elt, pos);
402 if (a_nbElts>1 && pos2 == string::npos)
404 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
409 for (
int i=0 ; i<a_nbElts ; i++)
414 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
415 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
420 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
424 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file " << a_file << endl);
430 pos = (pos2<0) ? -1 : pos2+1 ;
431 pos2 = line.find_first_of(sep_elt, pos);
440 if (a_mandatoryFlag ==
true )
442 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
452 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '" << a_file <<
"' !" << endl);
494 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag)
496 ifstream input_file(a_file.c_str(), ios::in);
499 string sep_comment =
"#";
500 string sep_elt =
",";
501 bool search_on =
false;
506 while(!input_file.eof())
508 getline(input_file, line);
511 if (line.find(sep_comment) != string::npos) line = line.substr(0, line.find_first_of(sep_comment)) ;
513 if( line.find(a_firstTag) != string::npos) search_on =
true;
514 if( line.find(a_lastTag) != string::npos || line.find(
"eof") != string::npos ) search_on =
false;
518 if (line.find(a_keyword) != string::npos)
522 line = line.substr(line.find_first_of(sep)+1);
528 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
529 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
532 size_t pos2 = line.find_first_of(sep_elt, pos);
535 if (a_nbElts>1 && pos2 == string::npos)
537 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
542 for (
int i=0 ; i<a_nbElts ; i++)
548 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
549 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
554 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
558 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
564 pos = (pos2<0) ? -1 : pos2+1 ;
565 pos2 = line.find_first_of(sep_elt, pos);
578 if(a_mandatoryFlag ==
true)
580 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
590 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '"<< a_file <<
"' !" << endl);
637 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag)
639 ifstream input_file(a_file.c_str(), ios::in);
642 string sep_comment =
"#";
643 string sep_elt =
",";
644 bool search_on =
false;
649 while(!input_file.eof())
651 getline(input_file, line);
654 if (line.find(sep_comment) != string::npos) line = line.substr(0, line.find_first_of(sep_comment)) ;
656 if( line.find(a_firstTag) != string::npos) search_on =
true;
657 if( line.find(a_lastTag) != string::npos || line.find(
"eof") != string::npos ) search_on =
false;
661 for (
int l=0 ; l<a_nbLines ; l++)
663 getline(input_file, line);
665 line = line.substr(line.find_first_of(sep)+1);
671 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
672 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
675 size_t pos2 = line.find_first_of(sep_elt, pos);
678 if (a_nbElts>1 && pos2 == string::npos)
680 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
685 for (
int i=0 ; i<a_nbElts ; i++)
690 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
691 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
696 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
700 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file " << a_file << endl);
706 pos = (pos2<0) ? -1 : pos2+1 ;
707 pos2 = line.find_first_of(sep_elt, pos);
716 if(a_mandatoryFlag ==
true)
718 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
728 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '"<< a_file <<
"' !" << endl);
751 *a_result = a_str.c_str();
773 const char* p = a_str.c_str();
776 double val = strtod(p, &end);
780 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into float " << endl);
785 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into float " << endl);
789 *a_result =
static_cast<float>(val);
812 const char* p = a_str.c_str();
815 double val = strtod(p, &end);
819 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into double " << endl);
824 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into double " << endl);
851 const char* p = a_str.c_str();
854 long double val = strtold(p, &end);
858 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into double " << endl);
863 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into double " << endl);
890 const char* p = a_str.c_str();
893 int64_t val = strtol(p, &end, 10);
897 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into int " << endl);
900 if (errno==ERANGE || val<INT_MIN || val>INT_MAX)
902 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into int " << endl);
906 *a_result =
static_cast<int>(val);
929 const char* p = a_str.c_str();
932 int64_t val = strtol(p, &end, 10);
936 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into int64_t " << endl);
941 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into int64_t " << endl);
968 const char* p = a_str.c_str();
971 int64_t val = strtol(p, &end, 10);
975 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
978 if (errno == ERANGE || val<0 || val>UCHAR_MAX)
980 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1007 const char* p = a_str.c_str();
1010 int64_t val = strtol(p, &end, 10);
1014 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1017 if (errno == ERANGE || val<0 || val>USHRT_MAX)
1019 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1046 const char* p = a_str.c_str();
1049 int64_t val = strtol(p, &end, 10);
1053 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into uint32 " << endl);
1056 if (errno == ERANGE || val<0 || val>UINT_MAX)
1058 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into uint32 " << endl);
1085 const char* p = a_str.c_str();
1088 int64_t val = strtol(p, &end, 10);
1092 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into bool " << endl);
1095 if (errno == ERANGE || val<0 || val>1)
1097 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into bool " << endl);
1121 string path = a_pathToFile;
1123 int pos = path.find_last_of(
OS_SEP);
1124 if (path.find_last_of(
OS_SEP) == string::npos)
1127 path = path.substr(pos+1);
1146 string path = a_pathToFile;
1148 int pos = path.find_last_of(
OS_SEP);
1149 if (path.find_last_of(
OS_SEP) == string::npos)
1152 path = path.substr(0,pos+1);
1166 string result = a_path;
1168 while ( (position = result.find_first_of(
"/")) != string::npos )
1170 result.replace(position,1,
"\\");
1186 FLTNB absA = abs(a);
1187 FLTNB absB = abs(b);
1188 FLTNB diff = abs(a - b);
1196 diff < std::numeric_limits<FLTNB>::min())
1198 return diff < (a_eps * std::numeric_limits<FLTNB>::min() );
1202 return diff / min((absA + absB), std::numeric_limits<FLTNB>::max()) < a_eps;
1213 template int ReadStringOption<string>(
const string& a_input,
string* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1214 template int ReadStringOption<int>(
const string& a_input,
int* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1215 template int ReadStringOption<int64_t>(
const string& a_input, int64_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1216 template int ReadStringOption<float>(
const string& a_input,
float* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1217 template int ReadStringOption<double>(
const string& a_input,
double* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1218 template int ReadStringOption<long double>(
const string& a_input,
long double* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1219 template int ReadStringOption<uint8_t>(
const string& a_input, uint8_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1220 template int ReadStringOption<uint16_t>(
const string& a_input, uint16_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1221 template int ReadStringOption<uint32_t>(
const string& a_input, uint32_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1222 template int ReadStringOption<bool>(
const string& a_input,
bool* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1224 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1225 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1226 template int ReadDataASCIIFile<int64_t>(
const string& a_file,
const string& a_keyword, int64_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1227 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1228 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1229 template int ReadDataASCIIFile<long double>(
const string& a_file,
const string& a_keyword,
long double* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1230 template int ReadDataASCIIFile<uint8_t>(
const string& a_file,
const string& a_keyword, uint8_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1231 template int ReadDataASCIIFile<uint16_t>(
const string& a_file,
const string& a_keyword, uint16_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1232 template int ReadDataASCIIFile<uint32_t>(
const string& a_file,
const string& a_keyword, uint32_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1233 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1235 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1236 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1237 template int ReadDataASCIIFile<int64_t>(
const string& a_file,
const string& a_keyword, int64_t* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1238 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1239 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1240 template int ReadDataASCIIFile<long double>(
const string& a_file,
const string& a_keyword,
long double* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1241 template int ReadDataASCIIFile<uint8_t>(
const string& a_file,
const string& a_keyword, uint8_t* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1242 template int ReadDataASCIIFile<uint16_t>(
const string& a_file,
const string& a_keyword, uint16_t* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1243 template int ReadDataASCIIFile<uint32_t>(
const string& a_file,
const string& a_keyword, uint32_t* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1244 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1246 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1247 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1248 template int ReadDataASCIIFile<int64_t>(
const string& a_file,
const string& a_keyword, int64_t** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1249 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1250 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1251 template int ReadDataASCIIFile<long double>(
const string& a_file,
const string& a_keyword,
long double** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1252 template int ReadDataASCIIFile<uint8_t>(
const string& a_file,
const string& a_keyword, uint8_t** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1253 template int ReadDataASCIIFile<uint16_t>(
const string& a_file,
const string& a_keyword, uint16_t** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1254 template int ReadDataASCIIFile<uint32_t>(
const string& a_file,
const string& a_keyword, uint32_t** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1255 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1257 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1258 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1259 template int ReadDataASCIIFile<int64_t>(
const string& a_file,
const string& a_keyword, int64_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1260 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1261 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1262 template int ReadDataASCIIFile<long double>(
const string& a_file,
const string& a_keyword,
long double* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1263 template int ReadDataASCIIFile<uint8_t>(
const string& a_file,
const string& a_keyword, uint8_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1264 template int ReadDataASCIIFile<uint16_t>(
const string& a_file,
const string& a_keyword, uint16_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1265 template int ReadDataASCIIFile<uint32_t>(
const string& a_file,
const string& a_keyword, uint32_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1266 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool* ap_return,
int a_nbElts,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1268 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1269 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1270 template int ReadDataASCIIFile<int64_t>(
const string& a_file,
const string& a_keyword, int64_t** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1271 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1272 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1273 template int ReadDataASCIIFile<long double>(
const string& a_file,
const string& a_keyword,
long double** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1274 template int ReadDataASCIIFile<uint8_t>(
const string& a_file,
const string& a_keyword, uint8_t** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1275 template int ReadDataASCIIFile<uint16_t>(
const string& a_file,
const string& a_keyword, uint16_t** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1276 template int ReadDataASCIIFile<uint32_t>(
const string& a_file,
const string& a_keyword, uint32_t** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
1277 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag,
string a_firstTag,
string a_lastTag);
string GetFileFromPath(const string &a_pathToFile)
Simply return the file from a path string passed in parameter.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
template int ReadDataASCIIFile< double >(const string &a_file, const string &a_keyword, double *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadDataASCIIFile< float >(const string &a_file, const string &a_keyword, float *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadDataASCIIFile< int >(const string &a_file, const string &a_keyword, int *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadStringOption< int64_t >(const string &a_input, int64_t *ap_return, int a_nbElts, const string &sep, const string &a_option)
template int ReadStringOption< uint8_t >(const string &a_input, uint8_t *ap_return, int a_nbElts, const string &sep, const string &a_option)
template int ReadStringOption< uint32_t >(const string &a_input, uint32_t *ap_return, int a_nbElts, const string &sep, const string &a_option)
template int ReadDataASCIIFile< int64_t >(const string &a_file, const string &a_keyword, int64_t *ap_return, int a_nbElts, bool a_mandatoryFlag)
#define KEYWORD_MANDATORY_NOT_FOUND
template int ReadStringOption< string >(const string &a_input, string *ap_return, int a_nbElts, const string &sep, const string &a_option)
template int ReadDataASCIIFile< long double >(const string &a_file, const string &a_keyword, long double *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadStringOption< uint16_t >(const string &a_input, uint16_t *ap_return, int a_nbElts, const string &sep, const string &a_option)
string ConvertAllSlashOccurrencesToBackSlash(const string &a_path)
bool FLTNBIsEqual(FLTNB a, FLTNB b, FLTNB a_eps)
Comparison of FLTNB numbers.
string GetPathOfFile(const string &a_pathToFile)
Simply return the path to the directory of a file path string passed in parameter.
template int ReadDataASCIIFile< bool >(const string &a_file, const string &a_keyword, bool *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadDataASCIIFile< uint16_t >(const string &a_file, const string &a_keyword, uint16_t *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadDataASCIIFile< uint8_t >(const string &a_file, const string &a_keyword, uint8_t *ap_return, int a_nbElts, bool a_mandatoryFlag)
template int ReadDataASCIIFile< string >(const string &a_file, const string &a_keyword, string *ap_return, int a_nbElts, bool a_mandatoryFlag)
int ReadStringOption(const string &a_input, T *ap_return, int a_nbElts, const string &sep, const string &a_option)
Parse the 'a_input' string corresponding to the 'a_option' into 'a_nbElts' elements, using the 'sep' separator. The results are returned in the templated 'ap_return' dynamic templated array. Call "ConvertFromString()" to perform the correct conversion depending on the type of the data to convert.
template int ReadStringOption< bool >(const string &a_input, bool *ap_return, int a_nbElts, const string &sep, const string &a_option)
#define KEYWORD_OPTIONAL_NOT_FOUND
template int ReadStringOption< double >(const string &a_input, double *ap_return, int a_nbElts, const string &sep, const string &a_option)
Declaration of class sOutputManager.
template int ReadDataASCIIFile< uint32_t >(const string &a_file, const string &a_keyword, uint32_t *ap_return, int a_nbElts, bool a_mandatoryFlag)
This file is used for all kind of different functions designed for options parsing and ASCII file rea...
int ReadDataASCIIFile(const string &a_file, const string &a_keyword, T *ap_return, int a_nbElts, bool a_mandatoryFlag)
Look for "a_nbElts" elts in the "a_file" file matching the "a_keyword" string passed as parameter a...
int ConvertFromString(const string &a_str, string *a_result)
Copy the 'a_str' string in the position pointed by 'a_result'.
template int ReadStringOption< float >(const string &a_input, float *ap_return, int a_nbElts, const string &sep, const string &a_option)
template int ReadStringOption< int >(const string &a_input, int *ap_return, int a_nbElts, const string &sep, const string &a_option)
template int ReadStringOption< long double >(const string &a_input, long double *ap_return, int a_nbElts, const string &sep, const string &a_option)