ee75c4f5f7bd50d4d62ed17f5a856d5aacb2f3c1
[alexxy/gromacs-pyapi.git] / src / sip / options / filenameoption.sip
1 /*
2  * This file is part of the GROMACS-PyAPI package.
3  *
4  * Copyright (c) 2014,2015,
5  * by Maks Koltsov <maks@omrb.pnpi.spb.ru> and
6  * by Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
7  *
8  * GROMACS-PyAPI is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1
11  * of the License, or (at your option) any later version.
12  *
13  * GROMACS-PyAPI is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with GROMACS; if not, see
20  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
22  */
23
24 %ModuleHeaderCode
25 #include "gromacs/options/filenameoption.h"
26 #include "gromacs/fileio/filetypes.h"
27 typedef gmx::OptionTemplate < std::string, gmx::FileNameOption > FileNameOptionTemplate;
28 using namespace gmx; // needed for compilation of enum
29 %End
30
31 typedef OptionTemplate < std::string, FileNameOption > FileNameOptionTemplate;
32
33 enum OptionFileType {
34     eftUnknown, eftTopology, eftTrajectory, eftPDB,
35     eftIndex, eftPlot, eftGenericData, eftOptionFileType_NR
36 };
37
38 enum {
39     efMDP,
40     efTRX, efTRO, efTRN, efTRR, efCOMPRESSED, efXTC, efTNG,
41     efEDR,
42     efSTX, efSTO, efGRO, efG96, efPDB, efBRK, efENT, efESP, efPQR,
43     efCPT,
44     efLOG, efXVG, efOUT,
45     efNDX,
46     efTOP, efITP,
47     efTPS, efTPR,
48     efTEX, efRTP, efATP, efHDB,
49     efDAT, efDLG,
50     efMAP, efEPS, efMAT, efM2P,
51     efMTX,
52     efEDI,
53     efCUB,
54     efXPM,
55     efRND,
56     efNR
57 };
58
59 class FileNameOption: FileNameOptionTemplate /NoDefaultCtors/ {
60     %TypeHeaderCode
61 #include "gromacs/options/filenameoption.h"
62     using gmx::FileNameOption;
63     %End
64     public:
65         FileNameOption &filetype(OptionFileType);
66         FileNameOption &legacyType(int);
67         FileNameOption &inputFile();
68         FileNameOption &outputFile();
69         FileNameOption &inputOutputFile();
70         FileNameOption &readWriteFlags(bool, bool);
71         FileNameOption &libraryFile(bool = true);
72         FileNameOption &defaultBasename(const char* /KeepReference/);
73         FileNameOption &defaultType(int);
74 };
75
76 class FileNameOptionManager: public IOptionManager /NoDefaultCtors/ {
77     %TypeHeaderCode
78 #include <gromacs/options/filenameoptionmanager.h>
79     %End
80     public:
81         FileNameOptionManager();
82 };