Update headers, fix style for some py files
[alexxy/gromacs.git] / src / python / sip / options / abstractoption.sip
index 9292cb738d0aaa8907c76f39072ece6999017b0c..17236636806a80e2fabdfce4c9ecfb1d8ff9a541 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.
@@ -33,7 +33,7 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-class AbstractOption /NoDefaultCtors/ {
+class AbstractOption /NoDefaultCtors,Abstract/ {
 %TypeHeaderCode
 #include <gromacs/options/abstractoption.h>
 using gmx::AbstractOption;
@@ -46,8 +46,14 @@ template<T, U> class OptionTemplate : AbstractOption /NoDefaultCtors/ {
 using namespace gmx;
 %End
 public:
-    U& description(const char *);
+    U& description(const char * /KeepReference/);
     U& hidden(bool = true);
     U& required(bool = true);
-    // TODO: allowMultiple and friends will be added later, with vector support in the holder
+    U& allowMultiple(bool = true);
+    // FIXME
+    // These function do not work, because they store pointer to argument, which then is garbage collected in python.
+    // Different combinations of Factory, KeepReference and Transfer annotations do not help.
+    // Use third argument of PyOptionsHolder's methods instead.
+    U& defaultValue(const T&);
+    U& defaultValueIfSet(const T&);
 };