MDAL
mdal_binary_dat.hpp
1 /*
2  MDAL - Mesh Data Abstraction Library (MIT License)
3  Copyright (C) 2018 Peter Petrik (zilolv at gmail dot com)
4 */
5 
6 #ifndef MDAL_BINARY_DAT_HPP
7 #define MDAL_BINARY_DAT_HPP
8 
9 #include <string>
10 #include <vector>
11 #include <memory>
12 #include <iosfwd>
13 #include <iostream>
14 #include <fstream>
15 
16 #include "mdal_data_model.hpp"
17 #include "mdal.h"
18 #include "mdal_driver.hpp"
19 
20 namespace MDAL
21 {
22 
23  class DriverBinaryDat: public Driver
24  {
25  public:
27  ~DriverBinaryDat( ) override;
28  DriverBinaryDat *create() override;
29 
30  bool canReadDatasets( const std::string &uri ) override;
31  void load( const std::string &datFile, Mesh *mesh ) override;
32  bool persist( DatasetGroup *group ) override;
33 
34  std::string writeDatasetOnFileSuffix() const override;
35 
36  private:
37  bool readVertexTimestep( const Mesh *mesh,
38  std::shared_ptr<DatasetGroup> group,
39  std::shared_ptr<DatasetGroup> groupMax,
40  RelativeTimestamp time,
41  bool hasStatus,
42  int sflg,
43  std::ifstream &in );
44 
45  std::string mDatFile;
46  };
47 
48 } // namespace MDAL
49 #endif //MDAL_BINARY_DAT_HPP
Definition: mdal_data_model.hpp:137
Definition: mdal_binary_dat.hpp:24
void load(const std::string &datFile, Mesh *mesh) override
The DAT format contains "datasets" and each dataset has N-outputs.
Definition: mdal_binary_dat.cpp:119
Definition: mdal_driver.hpp:28
Definition: mdal_data_model.hpp:238
Definition: mdal_datetime.hpp:18