37 #ifndef AIMS_IO_FDFPROCPAR_G_H 38 #define AIMS_IO_FDFPROCPAR_G_H 52 #include <sys/types.h> 92 std::ifstream file( _name.c_str(), std::ios::in | std::ios::binary );
100 count = this->
search(file, param, fdftype, 1);
103 for (
int index = 0; index < count; index++) {
106 getline(file, line, paramsep);
109 line.erase(line.find_last_not_of (
" ") + 1);
112 start = ( line.find(
'"' ) == 0 ? 1 : 0 );
113 end = line.size() - 1;
114 if ( line.rfind(
'"' ) == end ) {
117 line = line.substr( start, end - start + 1 );
120 values.push_back(value);
133 std::vector<T> foundvalues = values<T>( param );
135 if ( foundvalues.size() > 0 ) {
136 return foundvalues[0];
146 return value<T>(param, defaultvalue);
std::string search(std::ifstream &file, std::string param)
The class for EcatSino data write operation.
T value(std::string param)
static char getFdfSeparator()
static void launchErrnoExcept(const std::string &filename="")
void stringTo(const std::string &value, T &result)
std::vector< T > values(std::string param)
static T getFdfDefaultValue()