suanPan
FrameRecorder.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 Theodore Chang
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  ******************************************************************************/
29 #ifndef FRAMERECORDER_H
30 #define FRAMERECORDER_H
31 
32 #include <Recorder/Recorder.h>
33 
34 class FrameRecorder final : public Recorder {
35 #ifdef SUANPAN_HDF5
36  hid_t file_id = 0;
37 #endif
38 
39 public:
41  unsigned, // tag
42  OutputType, // recorder type
43  unsigned // interval
44  );
45  FrameRecorder(const FrameRecorder&) = delete;
46  FrameRecorder(FrameRecorder&&) noexcept = delete;
47  FrameRecorder& operator=(const FrameRecorder&) = delete;
48  FrameRecorder& operator=(FrameRecorder&&) noexcept = delete;
49  ~FrameRecorder() override;
50 
51  void record(const shared_ptr<DomainBase>&) override;
52 
53  void save() override;
54 
55  void print() override;
56 };
57 
58 #endif
59 
OutputType
Definition: OutputType.h:23
The DomainBase class is a template.
Definition: DomainBase.h:104
A FrameRecorder class.
Definition: FrameRecorder.h:34
FrameRecorder(FrameRecorder &&) noexcept=delete
void save() override
Definition: FrameRecorder.cpp:72
void print() override
Definition: FrameRecorder.cpp:74
FrameRecorder(const FrameRecorder &)=delete
void record(const shared_ptr< DomainBase > &) override
Definition: FrameRecorder.cpp:45
FrameRecorder(unsigned, OutputType, unsigned)
Definition: FrameRecorder.cpp:30
A Recorder class.
Definition: Recorder.h:35