2020-03-24 19:12:36 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "DerivedDataBackendInterface.h"
|
|
|
|
|
|
2021-12-16 19:56:56 -05:00
|
|
|
/**
|
2020-03-24 19:12:36 -04:00
|
|
|
* A file backed backend. This is used for local caching of data where more flexibility is needed than loose files.
|
2021-12-16 19:56:56 -05:00
|
|
|
*/
|
2020-03-24 19:12:36 -04:00
|
|
|
class FFileBackedDerivedDataBackend : public FDerivedDataBackendInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* Save the cache to disk
|
|
|
|
|
* @param Filename Filename to save
|
|
|
|
|
* @return true if file was saved successfully
|
|
|
|
|
*/
|
|
|
|
|
virtual bool SaveCache(const TCHAR* Filename) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load the cache from disk
|
|
|
|
|
* @param Filename Filename to load
|
|
|
|
|
* @return true if file was loaded successfully
|
|
|
|
|
*/
|
|
|
|
|
virtual bool LoadCache(const TCHAR* Filename) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Disables use of this cache and allows the underlying implementation to free up memory
|
|
|
|
|
*/
|
|
|
|
|
virtual void Disable() = 0;
|
|
|
|
|
};
|