QGIS/external/mdal/frmts/mdal_binary_dat.hpp

48 lines
1.2 KiB
C++
Raw Normal View History

2018-05-16 11:20:25 +02:00
/*
MDAL - Mesh Data Abstraction Library (MIT License)
Copyright (C) 2018 Peter Petrik (zilolv at gmail dot com)
*/
#ifndef MDAL_BINARY_DAT_HPP
#define MDAL_BINARY_DAT_HPP
#include <string>
#include <vector>
#include <memory>
#include <iosfwd>
#include <iostream>
#include <fstream>
2018-07-18 09:00:34 +02:00
#include "mdal_data_model.hpp"
2018-05-16 11:20:25 +02:00
#include "mdal.h"
2018-12-14 14:59:53 +01:00
#include "mdal_driver.hpp"
2018-05-16 11:20:25 +02:00
namespace MDAL
{
2018-12-14 14:59:53 +01:00
class DriverBinaryDat: public Driver
2018-05-16 11:20:25 +02:00
{
public:
2018-12-14 14:59:53 +01:00
DriverBinaryDat();
~DriverBinaryDat( ) override;
DriverBinaryDat *create() override;
bool canRead( const std::string &uri ) override;
void load( const std::string &datFile, Mesh *mesh, MDAL_Status *status ) override;
bool persist( DatasetGroup *group ) override;
2018-05-16 11:20:25 +02:00
private:
bool readVertexTimestep( const Mesh *mesh,
2018-07-18 09:00:34 +02:00
std::shared_ptr<DatasetGroup> group,
2018-08-29 12:10:03 +02:00
std::shared_ptr<DatasetGroup> groupMax,
2018-07-18 09:00:34 +02:00
double time,
bool hasStatus,
int sflg,
std::ifstream &in );
2018-05-16 11:20:25 +02:00
std::string mDatFile;
};
} // namespace MDAL
#endif //MDAL_BINARY_DAT_HPP