类 PolicyProfile::Settings

policyProfile 在其创建期间及其整个生存期内使用的设置。

总结

成员 说明
public 设置(const std::shared_ptr<MipContext& mipContext>, Cache存储Type cache存储Type, const std::shared_ptr<PolicyProfile::Observer>& observer) 用于配置配置文件的接口。
public CacheStorageType GetCacheStorageType() const 获取缓存是存储在内存中还是存储在磁盘上。
public const std::shared_ptr<PolicyProfile::Observer>& GetObserver() const 获取事件观察程序。
public std::shared_ptr<MipContext> GetMipContext() const 获取表示在所有配置文件之间共享的状态的 MIP 上下文。
public std::shared_ptr<HttpDelegate> GetHttpDelegate() const 获取应用程序提供的 HTTP 委托(如果有)。
public void SetHttpDelegate(const std::shared_ptr<HttpDelegate>& httpDelegate) 使用客户端自己的替代默认 HTTP 堆栈。
public std::shared_ptr<StorageDelegate> GetStorageDelegate() const 获取应用程序提供的 StorageDelegate(如果有)。
public void Set存储Delegate(const std::shared_ptr<存储Delegate>& storageDelegate) 使用客户端自己的实现替代默认存储缓存。
public std::shared_ptr<TaskDispatcherDelegate> GetTaskDispatcherDelegate() const 获取应用程序提供的 TaskDispatcher 委托(如果有)。
public void SetTaskDispatcherDelegate(const std::shared_ptr<TaskDispatcherDelegate>& taskDispatcherDelegate) 使用客户端自己的异步任务调度处理替代默认异步任务调度处理。
public void SetSessionId(const std::string& sessionId) 尚未记录。
public const std::string& GetSessionId() const 尚未记录。
public void SetCustom设置(const std::vector<std::p air<std::string, std::string>>& custom设置) 设置用于功能检查和测试的自定义设置。
public const std::vector<std::p air<std::string, std::string>>& GetCustom设置() const 获取用于功能检查和测试的自定义设置。
public const std::shared_ptr<void>& GetLoggerContext() const 获取记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。
public void SetLoggerContext(const std::shared_ptr<void>& loggerContext) 设置记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。
public ~设置() 尚未记录。

成员

Settings 函数

用于配置配置文件的接口。

参数:

  • mipContext:全局上下文设置

  • cacheStorageType:将任何缓存状态存储在内存中或磁盘上

  • observer:实现 PolicyProfile::Observer 接口的类。 可以为 nullptr。

GetCacheStorageType 函数

获取缓存是存储在内存中还是存储在磁盘上。

返回结果:使用的存储类型

GetObserver 函数

获取事件观察程序。

返回:事件观察程序。

GetMipContext 函数

获取表示在所有配置文件之间共享的状态的 MIP 上下文。

返回结果:MIP 上下文

GetHttpDelegate 函数

获取应用程序提供的 HTTP 委托(如果有)。

返回结果:要用于 HTTP 操作的 HTTP 委托

SetHttpDelegate 函数

使用客户端自己的替代默认 HTTP 堆栈。

参数:

  • httpDelegate:客户端应用程序实现的 Http 回调接口

GetStorageDelegate 函数

获取应用程序提供的 StorageDelegate(如果有)。

返回结果:要用于缓存操作的 StorageDelegate

SetStorageDelegate 函数

使用客户端自己的实现替代默认存储缓存。

参数:

  • storageDelegate:由客户端应用程序实现的 StorageDelegate

GetTaskDispatcherDelegate 函数

获取应用程序提供的 TaskDispatcher 委托(如果有)。

返回结果:要用于执行异步任务的 TaskDispatcher 委托

SetTaskDispatcherDelegate 函数

使用客户端自己的异步任务调度处理替代默认异步任务调度处理。

参数:

  • taskDispatcherDelegate:客户端应用程序实现的任务调度回调接口

任务可以引用阻止其析构的配置文件对象,因此不应共享 taskdispatcher 队列。

SetSessionId 函数

尚未记录。

GetSessionId 函数

尚未记录。

SetCustomSettings 函数

设置用于功能检查和测试的自定义设置。

参数:

  • customSettings:名称/值对列表。

GetCustomSettings 函数

获取用于功能检查和测试的自定义设置。

返回:名称/值对的列表。

GetLoggerContext 函数

获取记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。

返回结果:记录器上下文

SetLoggerContext 函数

设置记录器上下文,该上下文将被不透明地传递给与创建的配置文件关联的日志记录器委托。

参数:

  • loggerContext:记录器上下文

~Settings 函数

尚未记录。