Open 3D Engine AzToolsFramework 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.
AzToolsFramework::ViewBookmarkPersistInterface Class Referenceabstract

Provides the ability to override how the SettingsRegistry data is persisted. More...

#include <ViewBookmarkLoaderInterface.h>

Inherited by AzToolsFramework::LocalViewBookmarkLoader.

Public Types

using StreamWriteFn = AZStd::function< bool(const AZ::IO::PathView &localBookmarksFileName, AZStd::string_view stringBuffer, AZStd::function< bool(AZ::IO::GenericStream &genericStream, const AZStd::string &stringBuffer)>)>
 
using StreamReadFn = AZStd::function< AZStd::vector< char >(const AZ::IO::PathView &localBookmarksFileName)>
 
using FileExistsFn = AZStd::function< bool(const AZ::IO::PathView &localBookmarksFileName)>
 

Public Member Functions

virtual void OverrideStreamWriteFn (StreamWriteFn streamWriteFn)=0
 
virtual void OverrideStreamReadFn (StreamReadFn streamReadFn)=0
 
virtual void OverrideFileExistsFn (FileExistsFn fileExistsFn)=0
 

Detailed Description

Provides the ability to override how the SettingsRegistry data is persisted.

Member Typedef Documentation

◆ StreamReadFn

using AzToolsFramework::ViewBookmarkPersistInterface::StreamReadFn = AZStd::function<AZStd::vector<char>(const AZ::IO::PathView& localBookmarksFileName)>

Readable interface Will load the file name provided (using project for full path) and return the contents of the file.

◆ StreamWriteFn

using AzToolsFramework::ViewBookmarkPersistInterface::StreamWriteFn = AZStd::function<bool( const AZ::IO::PathView& localBookmarksFileName, AZStd::string_view stringBuffer, AZStd::function<bool(AZ::IO::GenericStream& genericStream, const AZStd::string& stringBuffer)>)>

Writable stream interface Accepts a filename and contents buffer, it will pass the buffer to the third parameter and output to the stream provided.

Member Function Documentation

◆ OverrideFileExistsFn()

virtual void AzToolsFramework::ViewBookmarkPersistInterface::OverrideFileExistsFn ( FileExistsFn  fileExistsFn)
pure virtual

Overrides the check for if the persistent View Bookmark Settings Registry exists or not.

Note
By default this will check for a file on disk.

Implemented in AzToolsFramework::LocalViewBookmarkLoader.

◆ OverrideStreamReadFn()

virtual void AzToolsFramework::ViewBookmarkPersistInterface::OverrideStreamReadFn ( StreamReadFn  streamReadFn)
pure virtual

Overrides the behavior of reading from a stream.

Note
By default this will read from a file on disk.

Implemented in AzToolsFramework::LocalViewBookmarkLoader.

◆ OverrideStreamWriteFn()

virtual void AzToolsFramework::ViewBookmarkPersistInterface::OverrideStreamWriteFn ( StreamWriteFn  streamWriteFn)
pure virtual

Overrides the behavior of writing to a stream.

Note
By default this will write to a file on disk.

Implemented in AzToolsFramework::LocalViewBookmarkLoader.


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