BioDynaMo  v1.05.178-e4103279
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 <cstdint>
19 #include <memory>
20 #include <string>
21 
22 namespace bdm {
23 
24 class Exporter {
25  public:
26  virtual ~Exporter();
27 
31  virtual void ExportIteration(std::string filename, uint64_t iteration) = 0;
32 
36  virtual void ExportSummary(std::string filename, uint64_t num_iterations) = 0;
37 };
38 
39 class BasicExporter : public Exporter {
40  public:
41  void ExportIteration(std::string filename, uint64_t iteration) override;
42 
43  void ExportSummary(std::string filename, uint64_t num_iterations) override;
44 };
45 
46 class MatlabExporter : public Exporter {
47  public:
48  void ExportIteration(std::string filename, uint64_t iteration) override;
49 
50  void ExportSummary(std::string filename, uint64_t num_iterations) override;
51 };
52 
53 class NeuroMLExporter : public Exporter {
54  public:
55  void ExportIteration(std::string filename, uint64_t iteration) override;
56 
57  void ExportSummary(std::string filename, uint64_t num_iterations) override;
58 };
59 
60 class ParaviewExporter : public Exporter {
61  public:
62  void ExportIteration(std::string filename, uint64_t iteration) override;
63 
67  void ExportSummary(std::string filename, uint64_t num_iterations) override;
68 };
69 
71 
73  public:
74  static std::unique_ptr<Exporter> GenerateExporter(ExporterType type);
75 };
76 
77 } // namespace bdm
78 
79 #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:70
@ kMatlab
Definition: exporter.h:70
@ kNeuroML
Definition: exporter.h:70
@ kBasic
Definition: exporter.h:70
@ kParaview
Definition: exporter.h:70