提供配置文件的用户和全局运行缓存访问接口.
更多...
|
virtual bool | load (const QString &localPrefix=QString())=0 |
| 解析缓存配置文件 更多...
|
|
virtual bool | save (const QString &localPrefix=QString(), QJsonDocument::JsonFormat format=QJsonDocument::Indented, bool sync=false)=0 |
| 保存缓存的值到磁盘中 localPrefix 为目录前缀 format 保存格式 sync 是否立即刷新 更多...
|
|
virtual bool | isGlobal () const =0 |
| 是否是全局缓存 更多...
|
|
virtual void | remove (const QString &key)=0 |
| 删除缓存中的配置项 key 配置项名称 更多...
|
|
virtual QStringList | keyList () const =0 |
| 返回配置内容的所有配置项 更多...
|
|
virtual bool | setValue (const QString &key, const QVariant &value, const int serial, const uint uid, const QString &callerAppid)=0 |
| 设置缓存中的值 key 配置项名称 value 需要设置的值 uid 设置时的用户id callerAppid 设置时的应用id 更多...
|
|
virtual QVariant | value (const QString &key) const =0 |
| 获取缓存中的值 key 配置项名称 更多...
|
|
virtual int | serial (const QString &key) const =0 |
| 返回配置项的单调递增值 key 配置项名称 更多...
|
|
virtual uint | uid () const =0 |
| 用户标识,为全局缓存时,uid为非用户标识的特定值 更多...
|
|
提供配置文件的用户和全局运行缓存访问接口.
\inmodule dtkcore
◆ isGlobal()
bool Dtk::Core::DConfigCache::isGlobal |
( |
| ) |
const |
|
pure virtual |
◆ keyList()
QStringList Dtk::Core::DConfigCache::keyList |
( |
| ) |
const |
|
pure virtual |
◆ load()
bool Dtk::Core::DConfigCache::load |
( |
const QString & |
localPrefix = QString() | ) |
|
|
pure virtual |
◆ remove()
void Dtk::Core::DConfigCache::remove |
( |
const QString & |
key | ) |
|
|
pure virtual |
◆ save()
bool Dtk::Core::DConfigCache::save |
( |
const QString & |
localPrefix = QString() , |
|
|
QJsonDocument::JsonFormat |
format = QJsonDocument::Indented , |
|
|
bool |
sync = false |
|
) |
| |
|
pure virtual |
◆ serial()
int Dtk::Core::DConfigCache::serial |
( |
const QString & |
key | ) |
const |
|
pure virtual |
◆ setValue()
bool Dtk::Core::DConfigCache::setValue |
( |
const QString & |
key, |
|
|
const QVariant & |
value, |
|
|
const int |
serial, |
|
|
const uint |
uid, |
|
|
const QString & |
callerAppid |
|
) |
| |
|
pure virtual |
◆ uid()
uint Dtk::Core::DConfigCache::uid |
( |
| ) |
const |
|
pure virtual |
◆ value()
QVariant Dtk::Core::DConfigCache::value |
( |
const QString & |
key | ) |
const |
|
pure virtual |
该类的文档由以下文件生成: