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;
|
2019-01-04 18:18:34 +01:00
|
|
|
bool persist( DatasetGroup *group ) override;
|
2018-05-16 11:20:25 +02:00
|
|
|
|
|
|
|
private:
|
2018-07-13 12:31:06 +02:00
|
|
|
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,
|
2018-07-13 12:31:06 +02:00
|
|
|
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
|