libdebugger: Add string setting type.
- Needed in order to properly implement a settings description for a remote interface.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||
* Copyright 2011-2013, Rene Gollent, [email protected].
|
||||
* Copyright 2011-2016, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef SETTING_H
|
||||
@@ -20,7 +20,8 @@ enum setting_type {
|
||||
SETTING_TYPE_OPTIONS,
|
||||
SETTING_TYPE_BOUNDED,
|
||||
SETTING_TYPE_RANGE,
|
||||
SETTING_TYPE_RECT
|
||||
SETTING_TYPE_RECT,
|
||||
SETTING_TYPE_STRING
|
||||
};
|
||||
|
||||
|
||||
@@ -106,6 +107,16 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class StringSetting : public virtual Setting {
|
||||
public:
|
||||
virtual setting_type Type() const;
|
||||
|
||||
virtual BVariant DefaultValue() const;
|
||||
|
||||
virtual const BString& DefaultStringValue() const = 0;
|
||||
};
|
||||
|
||||
|
||||
class AbstractSetting : public virtual Setting {
|
||||
public:
|
||||
AbstractSetting(const BString& id,
|
||||
@@ -230,4 +241,17 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class StringSettingImpl : public AbstractSetting, public StringSetting {
|
||||
public:
|
||||
StringSettingImpl(const BString& id,
|
||||
const BString& name,
|
||||
const BString& defaultValue);
|
||||
|
||||
virtual const BString& DefaultStringValue() const;
|
||||
|
||||
private:
|
||||
BString fDefaultValue;
|
||||
};
|
||||
|
||||
|
||||
#endif // SETTING_H
|
||||
|
||||
Reference in New Issue
Block a user