Update headers, fix style for some py files
[alexxy/gromacs.git] / src / python / sip / options / basicoptions.sip
index 48fe248dbfc73a8c75ab71b8c38a6366c3ed9417..91d56c998087b28714b366d39956e10e70b1e273 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-%ModuleCode
+%ModuleHeaderCode
 typedef gmx::OptionTemplate<double, gmx::DoubleOption> DoubleOptionTemplate;
+typedef gmx::OptionTemplate<int, gmx::IntegerOption> IntegerOptionTemplate;
+typedef gmx::OptionTemplate<std::string, gmx::StringOption> StringOptionTemplate;
+typedef gmx::OptionTemplate<bool, gmx::BooleanOption> BooleanOptionTemplate;
 %End
 
+class std::string;
 typedef OptionTemplate<double, DoubleOption> DoubleOptionTemplate;
+typedef OptionTemplate<int, IntegerOption> IntegerOptionTemplate;
+typedef OptionTemplate<std::string, StringOption> StringOptionTemplate;
+typedef OptionTemplate<bool, BooleanOption> BooleanOptionTemplate;
 
 class DoubleOption : DoubleOptionTemplate /NoDefaultCtors/ {
 %TypeHeaderCode
@@ -45,3 +52,26 @@ class DoubleOption : DoubleOptionTemplate /NoDefaultCtors/ {
 using gmx::DoubleOption;
 %End
 };
+class IntegerOption : IntegerOptionTemplate /NoDefaultCtors/ {
+%TypeHeaderCode
+#include "gromacs/options/basicoptions.h"
+using gmx::IntegerOption;
+%End
+};
+class StringOption : StringOptionTemplate /NoDefaultCtors/ {
+%TypeHeaderCode
+#include "gromacs/options/basicoptions.h"
+using gmx::StringOption;
+%End
+public:
+    StringOption& defaultValue(const char *);
+    %MethodCode
+        sipRes = &sipCpp->defaultValue(std::string(a0));
+    %End
+};
+class BooleanOption : BooleanOptionTemplate /NoDefaultCtors/ {
+%TypeHeaderCode
+#include "gromacs/options/basicoptions.h"
+using gmx::BooleanOption;
+%End
+};