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:
40  FrameRecorder(unsigned, // tag
41  OutputType, // recorder type
42  unsigned // interval
43  );
44  FrameRecorder(const FrameRecorder&) = delete;
45  FrameRecorder(FrameRecorder&&) noexcept = delete;
46  FrameRecorder& operator=(const FrameRecorder&) = delete;
47  FrameRecorder& operator=(FrameRecorder&&) noexcept = delete;
48  ~FrameRecorder() override;
49 
50  void record(const shared_ptr<DomainBase>&) override;
51 
52  void save() override;
53 
54  void print() override;
55 };
56 
57 #endif
58 
OutputType
Definition: OutputType.h:21
The DomainBase class is a template.
Definition: DomainBase.h:96
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