2015-10-05 13:36:39 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Core/Types.h>
|
|
|
|
#include <IO/ReadHelpers.h>
|
|
|
|
#include <IO/ReadBufferFromIStream.h>
|
|
|
|
#include <IO/CompressedReadBuffer.h>
|
2015-10-05 13:36:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char ** argv)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
std::ifstream istr("DevicePixelRatio");
|
|
|
|
DB::ReadBufferFromIStream in(istr);
|
|
|
|
|
|
|
|
DB::Float32 b = 0;
|
|
|
|
|
|
|
|
size_t i = 0;
|
|
|
|
while (!in.eof())
|
|
|
|
{
|
|
|
|
DB::readFloatText(b, in);
|
|
|
|
in.ignore();
|
|
|
|
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::cout << b << std::endl;
|
|
|
|
std::cout << i << std::endl;
|
|
|
|
}
|
|
|
|
catch (const DB::Exception & e)
|
|
|
|
{
|
|
|
|
std::cerr << e.what() << ", " << e.displayText() << std::endl;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2015-10-05 13:36:39 +00:00
|
|
|
}
|