AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Report.hpp
Go to the documentation of this file.
1/*
2 * This file is part of AQUAgpusph, a free CFD program based on SPH.
3 * Copyright (C) 2012 Jose Luis Cercos Pita <jl.cercos@upm.es>
4 *
5 * AQUAgpusph is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * AQUAgpusph is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with AQUAgpusph. If not, see <http://www.gnu.org/licenses/>.
17 */
18
23
24#ifndef REPORT_H_INCLUDED
25#define REPORT_H_INCLUDED
26
27#include <string>
28#include <stdexcept>
30#include "InputOutput.hpp"
31
32namespace Aqua {
33namespace InputOutput {
34
55class Report : public InputOutput
56{
57 public:
62 virtual void save(float t) = 0;
63
70 virtual void load() { throw std::logic_error("Report cannot load files"); }
71
75 std::string file() { return _output_file; }
76
77 protected:
79 Report();
80
82 virtual ~Report();
83
88 void file(std::string filename);
89
100 void file(std::string basename, unsigned int start_index);
101
102 private:
104 std::string _output_file;
105
106}; // class InputOutput
107
108}
109} // namespaces
110
111#endif // REPORT_H_INCLUDED
Base class for all the input/output file managers. (See Aqua::InputOutput::InputOutput for details)
InputOutput()
Constructor.
Definition InputOutput.hpp:41
std::string file()
Get the used output file path.
Definition Report.hpp:75
virtual void load()
Load the data.
Definition Report.hpp:70
virtual ~Report()
Destructor.
Definition Report.cpp:35
virtual void save(float t)=0
Save the data.
Report()
Constructor.
Definition Report.cpp:33
Input/Output data interfaces.
Definition ArgumentsManager.cpp:51
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50
Set of definitions and macros related with the implementation.