ReXGlue SDK
Loading...
Searching...
No Matches
rex::xam::UserProfile::Setting Struct Reference

#include <rex/xam/user_profile.h>

Inheritance diagram for rex::xam::UserProfile::Setting:
[legend]

Classes

union  Key

Public Types

enum class  Type : u8 {
  kContext = 0 , kInt32 = 1 , kInt64 = 2 , kDouble = 3 ,
  kUnicode = 4 , kFloat = 5 , kBinary = 6 , kDateTime = 7 ,
  kUnset = 0xFF
}

Public Member Functions

 Setting (u32 setting_id, Type type, size_t size, bool is_set)
virtual void WriteTo (X_USER_PROFILE_SETTING_DATA *data, SettingByteStream *stream)
virtual std::vector< u8 > Serialize () const
virtual void Deserialize (const std::vector< u8 > &)
bool IsTitleSpecific () const

Public Attributes

u32 setting_id
Type type
size_t size
bool is_set
u32 loaded_title_id

Detailed Description

A profile setting identified by ID, which can write itself into a guest value.

Member Enumeration Documentation

◆ Type

enum class rex::xam::UserProfile::Setting::Type : u8
strong

Value type of a setting, matching the XUSER_DATA type byte.

Constructor & Destructor Documentation

◆ Setting()

rex::xam::UserProfile::Setting::Setting ( u32 setting_id,
Type type,
size_t size,
bool is_set )
inline
Parameters
is_setTrue when the setting holds a value.

Member Function Documentation

◆ Deserialize()

virtual void rex::xam::UserProfile::Setting::Deserialize ( const std::vector< u8 > & )
inlinevirtual

Restores the value from bytes saved to disk.

Reimplemented in rex::xam::UserProfile::BinarySetting.

◆ IsTitleSpecific()

bool rex::xam::UserProfile::Setting::IsTitleSpecific ( ) const
inline

Reports whether the setting is saved per title.

Returns
True when the ID is in the title specific range.

◆ Serialize()

virtual std::vector< u8 > rex::xam::UserProfile::Setting::Serialize ( ) const
inlinevirtual

Returns the bytes saved to disk for a title specific setting.

Reimplemented in rex::xam::UserProfile::BinarySetting.

◆ WriteTo()

virtual void rex::xam::UserProfile::Setting::WriteTo ( X_USER_PROFILE_SETTING_DATA * data,
SettingByteStream * stream )
inlinevirtual

Writes the setting into a guest value.

Parameters
dataThe guest value to fill.
streamThe stream that receives variable length data.

Reimplemented in rex::xam::UserProfile::BinarySetting, rex::xam::UserProfile::DateTimeSetting, rex::xam::UserProfile::DoubleSetting, rex::xam::UserProfile::FloatSetting, rex::xam::UserProfile::Int32Setting, rex::xam::UserProfile::Int64Setting, and rex::xam::UserProfile::UnicodeSetting.

Member Data Documentation

◆ loaded_title_id

u32 rex::xam::UserProfile::Setting::loaded_title_id

ID of the title whose saved value was loaded, 0 when none.


The documentation for this struct was generated from the following file: