Debian Codegraph @

avogadro/quantumio/genericoutput.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_QUANTUMIO_GENERICOUTPUT_H
7 #define AVOGADRO_QUANTUMIO_GENERICOUTPUT_H
8
9 #include "avogadroquantumioexport.h"
10 #include <avogadro/io/fileformat.h>
11
12 #include <map>
13 #include <vector>
14
15 namespace Avogadro {
16 namespace QuantumIO {
17
18 class AVOGADROQUANTUMIO_EXPORT GenericOutput : public Io::FileFormat
19 {
20 public:
21 GenericOutput();
22 ~GenericOutput() override;
23
24 Operations supportedOperations() const override
25 {
26 return Read | File | Stream | String;
27 }
28
29 FileFormat* newInstance() const override { return new GenericOutput; }
30 std::string identifier() const override { return "Avogadro: Generic Output"; }
31 std::string name() const override { return "Generic Output"; }
32 std::string description() const override { return "Generic output format."; }
33
34 std::string specificationUrl() const override { return ""; }
35
36 std::vector<std::string> fileExtensions() const override;
37 std::vector<std::string> mimeTypes() const override;
38
39 [[nodiscard]] bool read(std::istream& in, Core::Molecule& molecule) override;
40 [[nodiscard]] bool write(std::ostream&, const Core::Molecule&) override
41 {
42 // Empty, as we do not write output files.
43 return false;
44 }
45 };
46
47 } // namespace QuantumIO
48 } // namespace Avogadro
49
50 #endif