#include <stdlib.h>
#include <math.h>
+static const char *IdSrc = "$Header$";
+static const char *IdHdr = "ID_CONFIGFILE";
+
/*******************************************************************************
************************************ CODE **************************************
*******************************************************************************/
string str = CurrentLine.substr(pos, end - pos);
val = strtod(str.c_str(),NULL);
CurrentIndex = end+1;
- // EXPERIMENTAL
- if (CurrentIndex >= CurrentLine.length())
- GetNextConfigLine();
- // END EXPERIMENTAL
+ if (CurrentIndex >= CurrentLine.length()) GetNextConfigLine();
return *this;
}
string str = CurrentLine.substr(pos, end - pos);
val = strtod(str.c_str(),NULL);
CurrentIndex = end+1;
- // EXPERIMENTAL
- if (CurrentIndex >= CurrentLine.length())
- GetNextConfigLine();
- // END EXPERIMENTAL
+ if (CurrentIndex >= CurrentLine.length()) GetNextConfigLine();
return *this;
}
string str = CurrentLine.substr(pos, end - pos);
val = atoi(str.c_str());
CurrentIndex = end+1;
- // EXPERIMENTAL
- if (CurrentIndex >= CurrentLine.length())
- GetNextConfigLine();
- // END EXPERIMENTAL
+ if (CurrentIndex >= CurrentLine.length()) GetNextConfigLine();
+ return *this;
+}
+
+FGConfigFile& FGConfigFile::operator>>(eParam& val)
+{
+ unsigned int pos, end;
+
+ pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
+ if (pos == CurrentLine.npos) pos = CurrentLine.length();
+ end = CurrentLine.find_first_of(", ",pos+1);
+ if (end == CurrentLine.npos) end = CurrentLine.length();
+ string str = CurrentLine.substr(pos, end - pos);
+ val = (eParam)atoi(str.c_str());
+ CurrentIndex = end+1;
+ if (CurrentIndex >= CurrentLine.length()) GetNextConfigLine();
return *this;
}
if (end == CurrentLine.npos) end = CurrentLine.length();
str = CurrentLine.substr(pos, end - pos);
CurrentIndex = end+1;
- // EXPERIMENTAL
- if (CurrentIndex >= CurrentLine.length())
- GetNextConfigLine();
- // END EXPERIMENTAL
+ if (CurrentIndex >= CurrentLine.length()) GetNextConfigLine();
return *this;
}