62 int ReadStringOption(
const string& a_input, T* ap_return,
int a_nbElts,
const string& sep,
const string& a_option)
66 size_t pos2 = a_input.find_first_of(sep, 0);
68 if (a_nbElts>1 && pos2 == string::npos)
70 Cerr(
"***** gOptions::ReadStringOption() -> Error : '" << sep <<
"' not found in option: " << a_option << endl);
75 for (
int i=0 ; i<a_nbElts ; i++)
77 string elt = a_input.substr(pos, pos2-pos);
81 Cerr(
"***** gOptions::ReadStringOption() -> Error when trying to read input data for option: " << a_option << endl);
86 pos2 = a_input.find_first_of(sep, pos);
123 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T* ap_return,
int a_nbElts,
bool a_mandatoryFlag)
125 ifstream input_file(a_file.c_str(), ios::in);
128 string sep_comment =
"#";
129 string sep_elt =
",";
134 while(!input_file.eof())
136 getline(input_file, line);
139 if (line.find(sep_comment) != string::npos) line = line.substr(0, line.find_first_of(sep_comment)) ;
141 if (line.find(a_keyword) != string::npos)
145 line = line.substr(line.find_first_of(sep)+1);
151 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
152 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
155 size_t pos2 = line.find_first_of(sep_elt, pos);
158 if (a_nbElts>1 && pos2 == string::npos)
160 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
165 for (
int i=0 ; i<a_nbElts ; i++)
169 if (pos==string::npos)
171 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
172 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
177 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
181 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
189 pos = (pos2==string::npos) ? string::npos : pos2+1;
190 pos2 = line.find_first_of(sep_elt, pos);
199 if (a_mandatoryFlag ==
true)
201 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
211 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '"<< a_file <<
"' !" << endl);
250 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag)
252 ifstream input_file(a_file.c_str(), ios::in);
255 string sep_comment =
"#";
256 string sep_elt =
",";
261 while (!input_file.eof())
263 getline(input_file, line);
266 if (line.find(sep_comment)) line = line.substr(0, line.find_first_of(sep_comment));
268 if (line.find(a_keyword) != string::npos)
271 for (
int l=0 ; l<a_nbLines ; l++)
273 getline(input_file, line);
275 line = line.substr(line.find_first_of(sep)+1);
281 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
282 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
285 size_t pos2 = line.find_first_of(sep_elt, pos);
288 if (a_nbElts>1 && pos2 == string::npos)
290 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
295 for (
int i=0 ; i<a_nbElts ; i++)
299 if (pos==string::npos)
301 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
302 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
307 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
311 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file " << a_file << endl);
318 pos = (pos2==string::npos) ? string::npos : pos2+1;
319 pos2 = line.find_first_of(sep_elt, pos);
328 if (a_mandatoryFlag ==
true)
330 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
340 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '" << a_file <<
"' !" << endl);
380 int ReadDataASCIIFile(
const string& a_file,
const string& a_keyword, T** a2p_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag)
382 ifstream input_file(a_file.c_str(), ios::in);
385 string sep_comment =
"#";
386 string sep_elt =
",";
391 while (!input_file.eof())
393 getline(input_file, line);
396 if (line.find(sep_comment)) line = line.substr(0, line.find_first_of(sep_comment));
398 if (line.find(a_keyword) != string::npos)
401 for (
int l=0 ; l<a_nbLines ; l++)
403 getline(input_file, line);
405 line = line.substr(line.find_first_of(sep)+1);
411 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
412 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
415 size_t pos2 = line.find_first_of(sep_elt, pos);
418 if (a_nbElts>1 && pos2 == string::npos)
420 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
425 for (
int i=0 ; i<a_nbElts ; i++)
429 if (pos==string::npos)
431 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
432 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
437 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
441 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file " << a_file << endl);
448 pos = (pos2==string::npos) ? string::npos : pos2+1;
449 pos2 = line.find_first_of(sep_elt, pos);
458 if (a_mandatoryFlag ==
true )
460 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
470 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '" << a_file <<
"' !" << endl);
512 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)
514 ifstream input_file(a_file.c_str(), ios::in);
517 string sep_comment =
"#";
518 string sep_elt =
",";
519 bool search_on =
false;
524 while(!input_file.eof())
526 getline(input_file, line);
529 if (line.find(sep_comment) != string::npos) line = line.substr(0, line.find_first_of(sep_comment)) ;
531 if( line.find(a_firstTag) != string::npos) search_on =
true;
532 if( line.find(a_lastTag) != string::npos || line.find(
"eof") != string::npos ) search_on =
false;
536 if (line.find(a_keyword) != string::npos)
540 line = line.substr(line.find_first_of(sep)+1);
546 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
547 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
550 size_t pos2 = line.find_first_of(sep_elt, pos);
553 if (a_nbElts>1 && pos2 == string::npos)
555 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
560 for (
int i=0 ; i<a_nbElts ; i++)
565 if (pos==string::npos)
567 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
568 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
573 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
577 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
584 pos = (pos2==string::npos) ? string::npos : pos2+1;
585 pos2 = line.find_first_of(sep_elt, pos);
598 if(a_mandatoryFlag ==
true)
600 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
610 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '"<< a_file <<
"' !" << endl);
657 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)
659 ifstream input_file(a_file.c_str(), ios::in);
662 string sep_comment =
"#";
663 string sep_elt =
",";
664 bool search_on =
false;
669 while(!input_file.eof())
671 getline(input_file, line);
674 if (line.find(sep_comment) != string::npos) line = line.substr(0, line.find_first_of(sep_comment)) ;
676 if( line.find(a_firstTag) != string::npos) search_on =
true;
677 if( line.find(a_lastTag) != string::npos || line.find(
"eof") != string::npos ) search_on =
false;
681 for (
int l=0 ; l<a_nbLines ; l++)
683 getline(input_file, line);
685 line = line.substr(line.find_first_of(sep)+1);
691 line.erase(0, line.find_first_not_of(
" !\t\r\n"));
692 line.erase(line.find_last_not_of(
" \t\r\n")+1 , line.length());
695 size_t pos2 = line.find_first_of(sep_elt, pos);
698 if (a_nbElts>1 && pos2 == string::npos)
700 Cerr(
"***** gOptions::ReadDataASCIIFile() -> The required separator : '" << sep_elt <<
"' not found for tag: " << a_keyword << endl);
705 for (
int i=0 ; i<a_nbElts ; i++)
709 if (pos==string::npos)
711 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file '" << a_file <<
"'." << endl);
712 Cerr(
"***** Expected to read " << a_nbElts <<
" elements, but only " << i+1 <<
" were found." << endl);
717 string elt = (a_nbElts>1) ? line.substr(pos, pos2-pos) : line ;
721 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Exception when trying to read tag '" << a_keyword <<
"' in file " << a_file << endl);
728 pos = (pos2==string::npos) ? string::npos : pos2+1;
729 pos2 = line.find_first_of(sep_elt, pos);
738 if(a_mandatoryFlag ==
true)
740 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Error when reading file '" << a_file <<
"'. Tag '" << a_keyword <<
"' was not found." << endl);
750 Cerr(
"***** gOptions::ReadDataASCIIFile() -> Couldn't find or read data-file '"<< a_file <<
"' !" << endl);
773 *a_result = a_str.c_str();
795 const char* p = a_str.c_str();
798 double val = strtod(p, &end);
802 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into float " << endl);
807 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into float " << endl);
811 *a_result =
static_cast<float>(val);
834 const char* p = a_str.c_str();
837 double val = strtod(p, &end);
841 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into double " << endl);
846 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into double " << endl);
873 const char* p = a_str.c_str();
876 long double val = strtold(p, &end);
880 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into double " << endl);
885 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into double " << endl);
912 const char* p = a_str.c_str();
915 int64_t val = strtol(p, &end, 10);
919 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into int " << endl);
922 if (errno==ERANGE || val<INT_MIN || val>INT_MAX)
924 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into int " << endl);
928 *a_result =
static_cast<int>(val);
951 const char* p = a_str.c_str();
954 int64_t val = strtol(p, &end, 10);
958 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into int64_t " << endl);
963 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into int64_t " << endl);
990 const char* p = a_str.c_str();
993 int64_t val = strtol(p, &end, 10);
997 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1000 if (errno == ERANGE || val<0 || val>UCHAR_MAX)
1002 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1029 const char* p = a_str.c_str();
1032 int64_t val = strtol(p, &end, 10);
1036 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1039 if (errno == ERANGE || val<0 || val>USHRT_MAX)
1041 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into uint16 " << endl);
1068 const char* p = a_str.c_str();
1071 int64_t val = strtol(p, &end, 10);
1075 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into uint32 " << endl);
1078 if (errno == ERANGE || val<0 || val>UINT_MAX)
1080 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into uint32 " << endl);
1107 const char* p = a_str.c_str();
1110 int64_t val = strtol(p, &end, 10);
1114 Cerr(
"***** gOptions::ConvertFromString() -> Invalid argument exception while trying to convert '" << a_str <<
"' into bool " << endl);
1117 if (errno == ERANGE || val<0 || val>1)
1119 Cerr(
"***** gOptions::ConvertFromString() -> Out of range exception while trying to convert '" << a_str <<
"' into bool " << endl);
1143 string path = a_pathToFile;
1145 int pos = path.find_last_of(
OS_SEP);
1146 if (path.find_last_of(
OS_SEP) == string::npos)
1149 path = path.substr(pos+1);
1168 string path = a_pathToFile;
1170 int pos = path.find_last_of(
OS_SEP);
1171 if (path.find_last_of(
OS_SEP) == string::npos)
1174 path = path.substr(0,pos+1);
1188 string result = a_path;
1190 while ( (position = result.find_first_of(
"/")) != string::npos )
1192 result.replace(position,1,
"\\");
1208 FLTNB absA = abs(a);
1209 FLTNB absB = abs(b);
1210 FLTNB diff = abs(a - b);
1218 diff < std::numeric_limits<FLTNB>::min())
1220 return diff < (a_eps * std::numeric_limits<FLTNB>::min() );
1224 return diff / min((absA + absB), std::numeric_limits<FLTNB>::max()) < a_eps;
1235 template int ReadStringOption<string>(
const string& a_input,
string* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1236 template int ReadStringOption<int>(
const string& a_input,
int* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1237 template int ReadStringOption<int64_t>(
const string& a_input, int64_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1238 template int ReadStringOption<float>(
const string& a_input,
float* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1239 template int ReadStringOption<double>(
const string& a_input,
double* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1240 template int ReadStringOption<long double>(
const string& a_input,
long double* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1241 template int ReadStringOption<uint8_t>(
const string& a_input, uint8_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1242 template int ReadStringOption<uint16_t>(
const string& a_input, uint16_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1243 template int ReadStringOption<uint32_t>(
const string& a_input, uint32_t* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1244 template int ReadStringOption<bool>(
const string& a_input,
bool* ap_return,
int a_nbElts,
const string& sep,
const string& a_option);
1246 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1247 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1248 template int ReadDataASCIIFile<int64_t>(
const string& a_file,
const string& a_keyword, int64_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1249 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1250 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1251 template int ReadDataASCIIFile<long double>(
const string& a_file,
const string& a_keyword,
long double* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1252 template int ReadDataASCIIFile<uint8_t>(
const string& a_file,
const string& a_keyword, uint8_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1253 template int ReadDataASCIIFile<uint16_t>(
const string& a_file,
const string& a_keyword, uint16_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1254 template int ReadDataASCIIFile<uint32_t>(
const string& a_file,
const string& a_keyword, uint32_t* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1255 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool* ap_return,
int a_nbElts,
bool a_mandatoryFlag);
1257 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1258 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1259 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);
1260 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1261 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1262 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);
1263 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);
1264 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);
1265 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);
1266 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool* ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1268 template int ReadDataASCIIFile<string>(
const string& a_file,
const string& a_keyword,
string** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1269 template int ReadDataASCIIFile<int>(
const string& a_file,
const string& a_keyword,
int** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1270 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);
1271 template int ReadDataASCIIFile<float>(
const string& a_file,
const string& a_keyword,
float** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1272 template int ReadDataASCIIFile<double>(
const string& a_file,
const string& a_keyword,
double** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1273 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);
1274 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);
1275 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);
1276 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);
1277 template int ReadDataASCIIFile<bool>(
const string& a_file,
const string& a_keyword,
bool** ap_return,
int a_nbElts,
int a_nbLines,
bool a_mandatoryFlag);
1279 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);
1280 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);
1281 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);
1282 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);
1283 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);
1284 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);
1285 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);
1286 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);
1287 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);
1288 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);
1290 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);
1291 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);
1292 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);
1293 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);
1294 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);
1295 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);
1296 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);
1297 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);
1298 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);
1299 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)