Open 3D Engine SaveData Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
SaveData::SaveDataNotifications Class Referenceabstract

EBus interface used to listen for notifications related to the saving of persistent user data. More...

#include <SaveDataNotificationBus.h>

Inherits AZ::EBusTraits.

Classes

struct  DataBufferLoadedParams
 The parameters sent with a data buffer loaded notification. More...
 
struct  DataBufferSavedParams
 The parameters sent with a data buffer saved notification. More...
 

Public Types

enum class  Result {
  Success , ErrorCanceled , ErrorCorrupt , ErrorInvalid ,
  ErrorNotFound , ErrorIOFailure , ErrorInProgress , ErrorOutOfMemory ,
  ErrorSyncFailure , ErrorUnknownUser , ErrorUnspecified
}
 Enum representing the result of a save or load data buffer request. More...
 
using DataBuffer = AZStd::shared_ptr< void >
 

Public Member Functions

virtual void OnDataBufferSaved (const DataBufferSavedParams &dataBufferSavedParams)=0
 
virtual void OnDataBufferLoaded (const DataBufferLoadedParams &dataBufferLoadedParams)=0
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 EBus Trait: save data notifications are addressed to a single address.
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple
 EBus Trait: save data notifications can be handled by multiple listeners.
 

Detailed Description

EBus interface used to listen for notifications related to the saving of persistent user data.

Member Typedef Documentation

◆ DataBuffer

using SaveData::SaveDataNotifications::DataBuffer = AZStd::shared_ptr<void>

DataBuffer is an alias for the shared_ptr to void loaded using a LoadDataBuffer request. Unlike SaveDataRequests::DataBuffer (a unique_ptr), SaveDataNotifications::DataBuffer is a shared_ptr so that listeners can decide whether they want/need to hold onto the memory.

Member Enumeration Documentation

◆ Result

Enum representing the result of a save or load data buffer request.

Enumerator
Success 

The save/load data buffer request was successful.

ErrorCanceled 

The save/load data buffer request failed: user cancelled.

ErrorCorrupt 

The save/load data buffer request failed: buffer corrupt.

ErrorInvalid 

The save/load data buffer request failed: invalid params.

ErrorNotFound 

The save/load data buffer request failed: file not found.

ErrorIOFailure 

The save/load data buffer request failed: file IO failure.

ErrorInProgress 

The save/load data buffer request failed: already in progress.

ErrorOutOfMemory 

The save/load data buffer request failed: insufficient memory.

ErrorSyncFailure 

The save/load data buffer request failed: synchronization issue.

ErrorUnknownUser 

The save/load data buffer request failed: local user id unknown.

ErrorUnspecified 

The save/load data buffer request failed: reason is unspecified.

Member Function Documentation

◆ OnDataBufferLoaded()

virtual void SaveData::SaveDataNotifications::OnDataBufferLoaded ( const DataBufferLoadedParams dataBufferLoadedParams)
pure virtual

Override to be notified when a data buffer load has completed, successfully or otherwise. Will always be broadcast from the main thread.

Parameters
[in]dataBufferLoadedParamsThe data buffer loaded notification parameters.

◆ OnDataBufferSaved()

virtual void SaveData::SaveDataNotifications::OnDataBufferSaved ( const DataBufferSavedParams dataBufferSavedParams)
pure virtual

Override to be notified when a data buffer save has completed, successfully or otherwise. Will always be broadcast from the main thread.

Parameters
[in]dataBufferSavedParamsThe data buffer saved notification parameters.

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