|
|
@@ -61,6 +61,23 @@ public:
|
|
|
CString getString(CString option) const;
|
|
|
/// @}
|
|
|
|
|
|
+ /// @name Create new options.
|
|
|
+ /// @{
|
|
|
+ void newOption(CString optionName, CString value, CString helpMsg);
|
|
|
+
|
|
|
+ template<typename T, ANKI_ENABLE(std::is_integral<T>::value)>
|
|
|
+ void newOption(CString optionName, T value, T minValue, T maxValue, CString helpMsg = "")
|
|
|
+ {
|
|
|
+ newOptionInternal(optionName, U64(value), U64(minValue), U64(maxValue), helpMsg);
|
|
|
+ }
|
|
|
+
|
|
|
+ template<typename T, ANKI_ENABLE(std::is_floating_point<T>::value)>
|
|
|
+ void newOption(CString optionName, T value, T minValue, T maxValue, CString helpMsg = "")
|
|
|
+ {
|
|
|
+ newOptionInternal(optionName, F64(value), F64(minValue), F64(maxValue), helpMsg);
|
|
|
+ }
|
|
|
+ /// @}
|
|
|
+
|
|
|
ANKI_USE_RESULT Error loadFromFile(CString filename);
|
|
|
|
|
|
ANKI_USE_RESULT Error saveToFile(CString filename) const;
|
|
|
@@ -93,22 +110,6 @@ private:
|
|
|
void setInternal(CString option, F64 value);
|
|
|
void setInternal(CString option, U64 value);
|
|
|
|
|
|
- /// @name Create new options.
|
|
|
- /// @{
|
|
|
- void newOption(CString optionName, CString value, CString helpMsg);
|
|
|
-
|
|
|
- template<typename T, ANKI_ENABLE(std::is_integral<T>::value)>
|
|
|
- void newOption(CString optionName, T value, T minValue, T maxValue, CString helpMsg = "")
|
|
|
- {
|
|
|
- newOptionInternal(optionName, U64(value), U64(minValue), U64(maxValue), helpMsg);
|
|
|
- }
|
|
|
-
|
|
|
- template<typename T, ANKI_ENABLE(std::is_floating_point<T>::value)>
|
|
|
- void newOption(CString optionName, T value, T minValue, T maxValue, CString helpMsg = "")
|
|
|
- {
|
|
|
- newOptionInternal(optionName, F64(value), F64(minValue), F64(maxValue), helpMsg);
|
|
|
- }
|
|
|
- /// @}
|
|
|
|
|
|
void newOptionInternal(CString optionName, U64 value, U64 minValue, U64 maxValue, CString helpMsg);
|
|
|
void newOptionInternal(CString optionName, F64 value, F64 minValue, F64 maxValue, CString helpMsg);
|