blob: 8b39e0fb6f955bfae442b23c87a9498f49f338a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright 2008 Nanorex, Inc. See LICENSE file for details.
#ifndef NX_OPENBABELIMPORTEXPORT_H
#define NX_OPENBABELIMPORTEXPORT_H
#include <QDir>
#include <QFile>
#include <QString>
#include <QObject>
#include <openbabel/obconversion.h>
#include "Nanorex/Utility/NXLogger.h"
#include "Nanorex/Utility/NXCommandResult.h"
#include "Nanorex/Interface/NXMoleculeSet.h"
#include "Nanorex/Interface/NXNanoVisionResultCodes.h"
#include "Nanorex/Interface/NXDataImportExportPlugin.h"
using namespace Nanorex;
#include <vector>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <stack>
#include <cassert>
using namespace std;
/* CLASS: OpenBabelImportExport */
class OpenBabelImportExport : public QObject, public NXDataImportExportPlugin {
Q_OBJECT
Q_INTERFACES(Nanorex::NXDataImportExportPlugin)
public:
OpenBabelImportExport();
~OpenBabelImportExport();
// NXDataImportExportPlugin implementation
NXCommandResult* importFromFile(NXMoleculeSet* moleculeSet,
NXDataStoreInfo* dataStoreInfo,
const std::string& filename,
int frameSetId, int frameIndex);
NXCommandResult* exportToFile(NXMoleculeSet* moleculeSet,
NXDataStoreInfo* dataStoreInfo,
const std::string& filename,
int frameSetId, int frameIndex);
private:
void populateCommandResult(NXCommandResult* result,
const string& message);
};
#endif
|