Provides access to a storage in an IPersistentStoragePlugin.
More...
#include "ipersistentstorageplugin.h"
|
virtual | ~IPersistentStorage () |
| Closes this storage handle. More...
|
|
virtual bool | HasKey (const QByteArray &key)=0 |
| Checks if the given key exists in the storage. More...
|
|
virtual QVariant | Get (const QByteArray &key)=0 |
| Returns the value associated with the given key. More...
|
|
virtual void | Set (const QByteArray &key, const QVariant &value)=0 |
| Stores the value under the given key. More...
|
|
Provides access to a storage in an IPersistentStoragePlugin.
The storage is a key-value database. The keys can be queried via the Get() method and set or updated via the Set() method.
Definition at line 21 of file ipersistentstorageplugin.h.
◆ ~IPersistentStorage()
virtual IPersistentStorage::~IPersistentStorage |
( |
| ) |
|
|
inlinevirtual |
◆ Get()
virtual QVariant IPersistentStorage::Get |
( |
const QByteArray & |
key | ) |
|
|
pure virtual |
Returns the value associated with the given key.
- Note
- This function may return a null QVariant either if the key was not set, or if it was set to a null QVariant before. These two cases are effectively indistinguishable.
- Parameters
-
[in] | key | The key for which the value should be returned. |
- Returns
- The value for this key or a null QVariant if no value is set.
- See also
- HasKey()
-
Set()
◆ HasKey()
virtual bool IPersistentStorage::HasKey |
( |
const QByteArray & |
key | ) |
|
|
pure virtual |
Checks if the given key exists in the storage.
- Parameters
-
[in] | key | The key to check for. |
- Returns
- Whether the given key exists in the storage.
- See also
- Get()
-
Set()
◆ Set()
virtual void IPersistentStorage::Set |
( |
const QByteArray & |
key, |
|
|
const QVariant & |
value |
|
) |
| |
|
pure virtual |
Stores the value under the given key.
- Parameters
-
[in] | key | The key for which the value should be returned. |
[in] | value | The value to associate with the key. |
- See also
- HasKey()
-
Get()
The documentation for this class was generated from the following file: