Commit ceb33c1d authored by Marco Amagliani's avatar Marco Amagliani
Browse files

Removed a not used headr file.

parent 1f03c9d0
......@@ -6,7 +6,6 @@ set(my_headers
${CMAKE_CURRENT_SOURCE_DIR}/ChecksumNumberT.hh
${CMAKE_CURRENT_SOURCE_DIR}/types.hh
${CMAKE_CURRENT_SOURCE_DIR}/TestResult.hh
${CMAKE_CURRENT_SOURCE_DIR}/ReadValuesT.hh
PARENT_SCOPE
)
......
// (C) Copyright 2016 by Autodesk, Inc.
#ifndef BASE_READVALUEST_HH_INCLUDE
#define BASE_READVALUEST_HH_INCLUDE
#include <fstream>
#include <string>
#include <vector>
namespace Test {
namespace Checksum {
/*! Parse the input file looking for a string and at every occurrence reads the
value of type ValueT following the string.
Returns a vector with all the read values.
*/
template <typename ValueT> std::vector<ValueT>
read_values(const std::string& _key, const char* const _flnm, const Path& _dir)
{
std::ifstream istr((_dir / _flnm).string());
std::string line;
std::vector<ValueT> vals;
while (std::getline(istr, line))
{
auto pos = line.find(_key);
if (pos == std::string::npos)
continue;
pos += _key.length();
std::stringstream str_dat(line.substr(pos));
vals.push_back(ValueT());
str_dat >> vals.back();
}
return vals;
}
}//Checksum
}//Test
#endif//BASE_READVALUEST_HH_INCLUDE
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment