BioDynaMo  v1.05.159-3be850bb
exporter.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 //
3 // Copyright (C) 2021 CERN & University of Surrey for the benefit of the
4 // BioDynaMo collaboration. All Rights Reserved.
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // See the LICENSE file distributed with this work for details.
10 // See the NOTICE file distributed with this work for additional information
11 // regarding copyright ownership.
12 //
13 // -----------------------------------------------------------------------------
14 
15 #ifndef CORE_EXPORTER_H_
16 #define CORE_EXPORTER_H_
17 
18 #include <memory>
19 #include <string>
20 
21 namespace bdm {
22 
23 class Exporter {
24  public:
25  virtual ~Exporter();
26 
30  virtual void ExportIteration(std::string filename, uint64_t iteration) = 0;
31 
35  virtual void ExportSummary(std::string filename, uint64_t num_iterations) = 0;
36 };
37 
38 class BasicExporter : public Exporter {
39  public:
40  void ExportIteration(std::string filename, uint64_t iteration) override;
41 
42  void ExportSummary(std::string filename, uint64_t num_iterations) override;
43 };
44 
45 class MatlabExporter : public Exporter {
46  public:
47  void ExportIteration(std::string filename, uint64_t iteration) override;
48 
49  void ExportSummary(std::string filename, uint64_t num_iterations) override;
50 };
51 
52 class NeuroMLExporter : public Exporter {
53  public:
54  void ExportIteration(std::string filename, uint64_t iteration) override;
55 
56  void ExportSummary(std::string filename, uint64_t num_iterations) override;
57 };
58 
59 class ParaviewExporter : public Exporter {
60  public:
61  void ExportIteration(std::string filename, uint64_t iteration) override;
62 
66  void ExportSummary(std::string filename, uint64_t num_iterations) override;
67 };
68 
70 
72  public:
73  static std::unique_ptr<Exporter> GenerateExporter(ExporterType type);
74 };
75 
76 } // namespace bdm
77 
78 #endif // CORE_EXPORTER_H_
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:46
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:33
static std::unique_ptr< Exporter > GenerateExporter(ExporterType type)
Definition: exporter.cc:326
virtual void ExportSummary(std::string filename, uint64_t num_iterations)=0
virtual ~Exporter()
virtual void ExportIteration(std::string filename, uint64_t iteration)=0
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:50
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:68
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:72
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:160
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:164
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:303
Definition: agent.cc:39
ExporterType
Definition: exporter.h:69
@ kMatlab
Definition: exporter.h:69
@ kNeuroML
Definition: exporter.h:69
@ kBasic
Definition: exporter.h:69
@ kParaview
Definition: exporter.h:69