BioDynaMo  v1.03.58-27764645
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_
bdm::ExporterType
ExporterType
Definition: exporter.h:69
bdm::BasicExporter::ExportSummary
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:46
bdm
Definition: agent.cc:39
bdm::BasicExporter
Definition: exporter.h:38
bdm::kBasic
@ kBasic
Definition: exporter.h:69
bdm::kNeuroML
@ kNeuroML
Definition: exporter.h:69
bdm::Exporter::~Exporter
virtual ~Exporter()
bdm::NeuroMLExporter::ExportIteration
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:72
bdm::ExporterFactory::GenerateExporter
static std::unique_ptr< Exporter > GenerateExporter(ExporterType type)
Definition: exporter.cc:326
bdm::MatlabExporter::ExportSummary
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:68
bdm::Exporter::ExportIteration
virtual void ExportIteration(std::string filename, uint64_t iteration)=0
bdm::BasicExporter::ExportIteration
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:33
bdm::kMatlab
@ kMatlab
Definition: exporter.h:69
bdm::ExporterFactory
Definition: exporter.h:71
bdm::MatlabExporter
Definition: exporter.h:45
bdm::MatlabExporter::ExportIteration
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:50
bdm::ParaviewExporter
Definition: exporter.h:59
bdm::NeuroMLExporter::ExportSummary
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:160
bdm::NeuroMLExporter
Definition: exporter.h:52
bdm::Exporter
Definition: exporter.h:23
bdm::Exporter::ExportSummary
virtual void ExportSummary(std::string filename, uint64_t num_iterations)=0
bdm::ParaviewExporter::ExportIteration
void ExportIteration(std::string filename, uint64_t iteration) override
Definition: exporter.cc:164
bdm::kParaview
@ kParaview
Definition: exporter.h:69
bdm::ParaviewExporter::ExportSummary
void ExportSummary(std::string filename, uint64_t num_iterations) override
Definition: exporter.cc:303