Base class for platform specific implementations of the save data system component.
More...
#include <SaveDataSystemComponent.h>
Inherits AZ::TickBus::Handler.
|
void | SaveDataBufferToFileSystem (const SaveDataBufferParams &saveDataBufferParams, const AZStd::string &absoluteFilePath, bool waitForCompletion=false, bool useTemporaryFile=true) |
|
void | LoadDataBufferFromFileSystem (const LoadDataBufferParams &loadDataBufferParams, const AZStd::string &absoluteFilePath, bool waitForCompletion=false) |
|
void | OnTick (float deltaTime, AZ::ScriptTimePoint scriptTimePoint) override |
| AZ::TickEvents::OnTick
|
|
void | JoinAllActiveThreads () |
| Convenience function to join all threads that are active.
|
|
void | JoinAllCompletedThreads () |
| Convenience function to join all threads that have been marked as completed.
|
|
Base class for platform specific implementations of the save data system component.
◆ Implementation()
SaveData::SaveDataSystemComponent::Implementation::Implementation |
( |
SaveDataSystemComponent & |
saveDataSystemComponent | ) |
|
Constructor
- Parameters
-
[in] | saveDataSystemComponent | Reference to the parent being implemented |
◆ Create()
Default factory create function
- Parameters
-
[in] | saveDataSystemComponent | Reference to the parent being implemented |
◆ LoadDataBuffer()
virtual void SaveData::SaveDataSystemComponent::Implementation::LoadDataBuffer |
( |
const LoadDataBufferParams & |
loadDataBufferParams | ) |
|
|
pure virtual |
Load a data buffer.
- Parameters
-
[in] | loadDataBufferParams | The load data buffer request parameters. |
◆ LoadDataBufferFromFileSystem()
void SaveData::SaveDataSystemComponent::Implementation::LoadDataBufferFromFileSystem |
( |
const LoadDataBufferParams & |
loadDataBufferParams, |
|
|
const AZStd::string & |
absoluteFilePath, |
|
|
bool |
waitForCompletion = false |
|
) |
| |
|
protected |
Load a data buffer from the file system.
- Parameters
-
[in] | loadDataBufferParams | The load data buffer request parameters. |
[in] | absoluteFilePath | The absolute file path from where to load the data buffer. |
[in] | waitForCompletion | Should we wait until the load data thread completes? |
◆ OnLoadDataBufferComplete()
static void SaveData::SaveDataSystemComponent::Implementation::OnLoadDataBufferComplete |
( |
SaveDataNotifications::DataBuffer |
dataBuffer, |
|
|
AZ::u64 |
dataBufferSize, |
|
|
const AZStd::string & |
dataBufferName, |
|
|
const AzFramework::LocalUserId |
localUserId, |
|
|
const SaveDataRequests::OnDataBufferLoaded & |
callback, |
|
|
const SaveDataNotifications::Result & |
result |
|
) |
| |
|
staticprotected |
Convenience function to broadcast SaveDataNotifications::OnDataBufferLoaded events in addition to any callback specified when SaveDataRequests::LoadDataBuffer was called.
- Parameters
-
[in] | dataBuffer | The data buffer that was loaded. |
[in] | dataBufferSize | The size of the data buffer that was loaded. |
[in] | dataBufferName | The name of the data buffer that was loaded. |
[in] | localUserId | The local user id the data that was loaded is associated with. |
[in] | result | The result of the load data buffer request. |
[in] | callback | The data buffer loaded callback to invoke. |
◆ OnSaveDataBufferComplete()
Convenience function to broadcast SaveDataNotifications::OnDataBufferSaved events in addition to any callback specified when SaveDataRequests::SaveDataBuffer was called.
- Parameters
-
[in] | dataBufferName | The name of the data buffer that was saved. |
[in] | localUserId | The local user id the data that was saved is associated with. |
[in] | result | The result of the save data buffer request. |
[in] | callback | The data buffer saved callback to invoke. |
◆ SaveDataBuffer()
virtual void SaveData::SaveDataSystemComponent::Implementation::SaveDataBuffer |
( |
const SaveDataBufferParams & |
saveDataBufferParams | ) |
|
|
pure virtual |
Save a data buffer.
- Parameters
-
[in] | saveDataBufferRequestParams | The save data buffer request parameters. |
◆ SaveDataBufferToFileSystem()
void SaveData::SaveDataSystemComponent::Implementation::SaveDataBufferToFileSystem |
( |
const SaveDataBufferParams & |
saveDataBufferParams, |
|
|
const AZStd::string & |
absoluteFilePath, |
|
|
bool |
waitForCompletion = false , |
|
|
bool |
useTemporaryFile = true |
|
) |
| |
|
protected |
Save a data buffer to the file system.
- Parameters
-
[in] | saveDataBufferRequestParams | The save data buffer request parameters. |
[in] | absoluteFilePath | The absolute file path where to save the data buffer. |
[in] | waitForCompletion | Should we wait until the save data thread completes? |
[in] | useTemporaryFile | Should we write to a temporary file that gets renamed? |
◆ SetSaveDataDirectoryPath()
virtual void SaveData::SaveDataSystemComponent::Implementation::SetSaveDataDirectoryPath |
( |
const char * |
saveDataDirectoryPath | ) |
|
|
pure virtual |
Set the path to the application's save data dircetory. Does nothing on some systems.
- Parameters
-
[in] | saveDataDirectoryPath | The path to the application's save data dircetory. |
◆ m_activeThreads
AZStd::list<ThreadCompletionPair> SaveData::SaveDataSystemComponent::Implementation::m_activeThreads |
|
protected |
Mutex to restrict access to the active threads.
A container of active threads
The documentation for this class was generated from the following file:
- Gems/SaveData/Code/Source/SaveDataSystemComponent.h