/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014, 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.
#include <string>
-#include "../legacyheaders/types/simple.h"
+#include "../utility/basedefinitions.h"
#include "../utility/gmxassert.h"
#include "abstractoption.h"
private:
//! Creates a BooleanOptionStorage object.
- virtual AbstractOptionStoragePointer createStorage() const;
+ virtual AbstractOptionStorage *createStorage(
+ const OptionManagerContainer &managers) const;
};
/*! \brief
private:
//! Creates an IntegerOptionStorage object.
- virtual AbstractOptionStoragePointer createStorage() const;
+ virtual AbstractOptionStorage *createStorage(
+ const OptionManagerContainer &managers) const;
/*! \brief
* Needed to initialize IntegerOptionStorage from this class without
private:
//! Creates an Int64OptionStorage object.
- virtual AbstractOptionStoragePointer createStorage() const;
+ virtual AbstractOptionStorage *createStorage(
+ const OptionManagerContainer &managers) const;
/*! \brief
* Needed to initialize Int64OptionStorage from this class without
private:
//! Creates a DoubleOptionStorage object.
- virtual AbstractOptionStoragePointer createStorage() const;
+ virtual AbstractOptionStorage *createStorage(
+ const OptionManagerContainer &managers) const;
bool bTime_;
private:
//! Creates a FloatOptionStorage object.
- virtual AbstractOptionStoragePointer createStorage() const;
+ virtual AbstractOptionStorage *createStorage(
+ const OptionManagerContainer &managers) const;
bool bTime_;
* The index (zero-based) of the selected value in the array \p values
* provided to enumValues() is written into \p *store after the
* option gets its value. If the option has not been provided,
- * and there is no default value, -1 is stored.
+ * and there is no default value, -1 is stored. If store(),
+ * storeVector() or defaultEnumIndex() is not present, the value in
+ * \p *store is kept as a default value, otherwise it is always
+ * overwritten.
*
* Cannot be specified without enumValue().
*
private:
//! Creates a StringOptionStorage object.
- virtual AbstractOptionStoragePointer createStorage() const;
+ virtual AbstractOptionStorage *createStorage(
+ const OptionManagerContainer &managers) const;
const char *const *enumValues_;
int enumValuesCount_;
public:
//! Creates an option info object for the given option.
explicit BooleanOptionInfo(BooleanOptionStorage *option);
+
+ //! Returns the default value for this option.
+ bool defaultValue() const;
+
+ private:
+ const BooleanOptionStorage &option() const;
};
/*! \brief