e931dd2410e984d2fc78e2a518051abe95b6ceed
[alexxy/gromacs-pyapi.git] / src / sip / options / options.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 class IOptionManager /NoDefaultCtors/ {
25     %TypeHeaderCode
26
27 #include <gromacs/options/options.h>
28     using gmx::IOptionManager;
29     %End
30
31     protected:
32         virtual ~IOptionManager();
33 };
34
35 class Options: public IOptionsContainer {
36     %TypeHeaderCode
37
38 #include <gromacs/options/options.h>
39     using gmx::Options;
40     %End
41
42     public:
43         Options(const char *name, const char *title);
44         void addManager (IOptionManager *manager);
45         void addSubSection (Options *section);
46         void addOption(const AbstractOption &settings);
47         IOptionsContainer *addGroup();
48         %MethodCode
49         IOptionsContainer &group = sipCpp->addGroup();
50         sipRes                   = &group;
51         %End
52
53         void finish();
54     private:
55         Options(const Options &other);
56 };