#include <Libs/PluginFramework/service/debug/ctkDebugOptions.h>
Used to get debug options settings.
Definition at line 34 of file ctkDebugOptions.h.
◆ ~ctkDebugOptions()
virtual ctkDebugOptions::~ctkDebugOptions |
( |
| ) |
|
|
inlinevirtual |
◆ getBooleanOption()
virtual bool ctkDebugOptions::getBooleanOption |
( |
const QString & |
option, |
|
|
bool |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the identified option as a boolean value. The specified defaultValue is returned if no such option is found or if debug is not enabled.
Options are specified in the general form <Plugin-SymbolicName>/<option-path>. For example, org.commontk.configadmin/debug
- Parameters
-
option | the name of the option to lookup |
defaultValue | the value to return if no such option is found |
- Returns
- the value of the requested debug option or the defaultValue if no such option is found.
◆ getIntegerOption()
virtual int ctkDebugOptions::getIntegerOption |
( |
const QString & |
option, |
|
|
int |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the identified option as an int value. The specified defaultValue is returned if no such option is found or if an error occurs while converting the option value to an integer or if debug is not enabled.
Options are specified in the general form <Plugin-SymbolicName>/<option-path>. For example, org.commontk.configadmin/debug
- Parameters
-
option | the name of the option to lookup |
defaultValue | the value to return if no such option is found |
- Returns
- the value of the requested debug option or the defaultValue if no such option is found.
◆ getOption() [1/2]
virtual QVariant ctkDebugOptions::getOption |
( |
const QString & |
option | ) |
const |
|
pure virtual |
Returns the identified option. A null value is returned if no such option is found or if debug is not enabled.
Options are specified in the general form <Plugin-SymbolicName>/<option-path>. For example, org.commontk.configadmin/debug
- Parameters
-
option | the name of the option to lookup |
- Returns
- the value of the requested debug option or
null
◆ getOption() [2/2]
virtual QVariant ctkDebugOptions::getOption |
( |
const QString & |
option, |
|
|
const QVariant & |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the identified option. The specified defaultValue is returned if no such option is found or if debug is not enabled.
Options are specified in the general form <Plugin-SymbolicName>/<option-path>. For example, org.commontk.configadmin/debug
- Parameters
-
option | the name of the option to lookup |
defaultValue | the value to return if no such option is found |
- Returns
- the value of the requested debug option or the defaultValue if no such option is found.
◆ getOptions()
virtual QHash<QString, QVariant> ctkDebugOptions::getOptions |
( |
| ) |
const |
|
pure virtual |
Returns a snapshot of the current options. If no options are set then an empty map is returned.
If debug is not enabled then the snapshot of the current disabled values is returned. See setDebugEnabled(bool).
- Returns
- a snapshot of the current options.
◆ isDebugEnabled()
virtual bool ctkDebugOptions::isDebugEnabled |
( |
| ) |
const |
|
pure virtual |
Returns true if debugging/tracing is currently enabled.
- Returns
- true if debugging/tracing is currently enabled; Otherwise false is returned.
◆ removeOption()
virtual void ctkDebugOptions::removeOption |
( |
const QString & |
option | ) |
|
|
pure virtual |
Removes the identified option. If debug is not enabled then the specified option is not removed.
- Parameters
-
option | the name of the option to remove |
◆ setDebugEnabled()
virtual void ctkDebugOptions::setDebugEnabled |
( |
bool |
enabled | ) |
|
|
pure virtual |
Enables or disables debugging/tracing.
When debug is disabled all debug options are unset. When disabling debug the current debug option values are stored in memory as disabled values. If debug is re-enabled the disabled values will be set back and enabled. The disabled values are only stored in memory and if the framework is restarted then the disabled option values will be lost.
- Parameters
-
value | If true , debug is enabled, otherwise debug is disabled. |
◆ setOption()
virtual void ctkDebugOptions::setOption |
( |
const QString & |
option, |
|
|
const QVariant & |
value |
|
) |
| |
|
pure virtual |
Sets the identified option to the identified value. If debug is not enabled then the specified option is not changed.
- Parameters
-
option | the name of the option to set |
value | the value of the option to set |
◆ setOptions()
virtual void ctkDebugOptions::setOptions |
( |
const QHash< QString, QVariant > & |
ops | ) |
|
|
pure virtual |
Sets the current option key/value pairs to the specified options. The specified map replaces all keys and values of the current debug options.
If debug is not enabled then the specified options are saved as the disabled values and no notifications will be sent. See setDebugEnabled(bool). If debug is enabled then notifications will be sent to the listeners which have options that have been changed, added or removed.
- Parameters
-
options | the new set of options |
◆ LISTENER_SYMBOLICNAME
const QString ctkDebugOptions::LISTENER_SYMBOLICNAME |
|
static |
The documentation for this struct was generated from the following file: