openVR驱动接口之IVRSettings简介

来源:互联网 发布:淘宝买家秀福利全集 编辑:程序博客网 时间:2024/04/30 19:16

IVRSettings
用来处理设置信息的接口.
const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError )
将eError以字符串的形式返回.
bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr )
如果文件同步了就返回true.
xxx Getxxx( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr )
这里有一系列的接口,来获取配置文件中,特定节,特定键值的特定类型值,例如:

  • bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr )
  • int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr )
  • float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr )
  • GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr )

void Setxxx( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
这里有一系列的接口,来设置配置文件中,特定节,特定键值的特定类型值,例如:

  • void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
  • SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr )
  • void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr )
  • void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr )

void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr )
移除特定(pchSection)节的配置.
void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr )
移除特定节中的特定属性值.

0 0
原创粉丝点击