LeviLamina
Loading...
Searching...
No Matches
LevelListCache Class Reference
Inheritance diagram for LevelListCache:

Public Types

using LevelAddedType = ::LevelListCacheObserver::LevelAddedType
using LockGuard = ::Bedrock::Threading::LockGuard<::std::recursive_mutex>

Public Member Functions

LevelListCache & operator= (LevelListCache const &)
 LevelListCache (LevelListCache const &)
virtual void addLevel (::std::string const &levelId, ::LevelData &&levelData)
virtual void deleteLevel (::std::string const &levelId)
virtual void refreshLevel (::std::string const &levelId)
virtual void ensureLevelInitialized (::std::string const &levelId)
virtual void deleteLevelFiles (::std::string const &levelId)
virtual void postDeleteLevel (::std::string const &levelId)
virtual void renameLevel (::std::string const &levelId, ::std::string const &newLevelName)
virtual void renameAndSaveLevelData (::std::string const &levelId, ::std::string const &newLevelName, ::LevelData const &levelData)
virtual void saveLevelData (::std::string const &levelId, ::LevelData const &levelData)
virtual void createBackupCopyOfWorld (::std::string const &levelId, ::std::string const &newLevelId, ::std::string const &newName)
virtual bool hasLevelWithId (::std::string const &levelId)
virtual::std::string getLevelIdFromPath (::Core::Path const &fullPath, ::Core::Path const &worldsPath)
virtual bool checkIfLevelIsCorruptOrMissing (::std::string const &levelId)
virtual void addObserver (::LevelListCacheObserver &observer)
virtual void removeObserver (::LevelListCacheObserver &observer)
virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage > createLevelStorage (::Scheduler &scheduler, ::std::string const &levelId, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider, ::std::chrono::nanoseconds const &writeFlushInterval, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv, ::std::unique_ptr<::LevelStorageEventing > levelStorageEventing)
virtual ::std::unique_ptr<::LevelLooseFileStorage > createLevelLooseStorage (::std::string const &levelId, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider)
virtual::LevelSummary * getLevelSummary (::std::string const &levelId)
virtual::LevelSummary const * getLevelSummaryByName (::std::string const &levelName)
virtual::LevelSummary * getOrCreateLevelSummary (::Core::Path const &directory)
virtual::LevelData * getLevelData (::std::string const &levelId)
virtual ::Bedrock::NonOwnerPointer<::LevelData > getLevelDataNonOwnerPointer (::std::string const &levelId)
virtual::LevelSummary * getShallowLevelSummary (::std::string const &levelId)
virtual void getLevelList (::std::vector<::LevelSummary > &dest, bool includeShallowSummaries, bool includePartiallyCopiedLevels, bool includeBetaRetailLevels, bool includeInvalidLevelDataLevels)
virtual bool hasCachedLevels (bool includeShallowSummaries) const
virtual void updateLevelCache (::std::string const &levelId)
virtual ::std::unique_ptr<::LevelStorageObserver > createLevelStorageObserver ()
virtual void onSave (::std::string const &levelId)
virtual void onStorageChanged ()
virtual ::Core::PathBuffer<::std::string > const getBasePath () const
virtual ::Core::PathBuffer<::std::string > const getPathToLevel (::std::string const &levelId) const
MCAPI LevelListCache (::LevelStorageSource &levelStorageSource, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const > appPlatform, ::std::function< bool()> &&checkIsSafeToFlushCache)
MCAPI::LevelCache * _addOrReplaceCache (::Core::Path const &path)
MCAPI::LevelCache * _addToCache (::std::string const &levelId, ::LevelCache &&levelCache, ::LevelListCacheObserver::LevelAddedType levelAddedType)
MCAPI::LevelCache * _createAndAddToCache (::std::string const &levelId, ::Core::Path const &directory, ::LevelListCacheObserver::LevelAddedType levelAddedType)
MCAPI::LevelCache * _getLevelCache (::std::string const &levelId)
MCAPI::LevelSummary * _getLevelSummary (::std::string const &levelId)
MCAPI void _notifyLevelUpdated (::std::string const &levelId)
MCAPI void _notifyNewLevelFound (::std::string const &levelId, ::LevelListCacheObserver::LevelAddedType type)
MCAPI void _refreshSummary (::std::string const &levelId, ::LevelCache &cache)
MCAPI void * $ctor (::LevelStorageSource &levelStorageSource, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const > appPlatform, ::std::function< bool()> &&checkIsSafeToFlushCache)
MCAPI void $addLevel (::std::string const &levelId, ::LevelData &&levelData)
MCAPI void $deleteLevel (::std::string const &levelId)
MCAPI void $refreshLevel (::std::string const &levelId)
MCAPI void $ensureLevelInitialized (::std::string const &levelId)
MCAPI void $deleteLevelFiles (::std::string const &levelId)
MCAPI void $postDeleteLevel (::std::string const &levelId)
MCAPI void $renameLevel (::std::string const &levelId, ::std::string const &newLevelName)
MCAPI void $renameAndSaveLevelData (::std::string const &levelId, ::std::string const &newLevelName, ::LevelData const &levelData)
MCAPI void $saveLevelData (::std::string const &levelId, ::LevelData const &levelData)
MCAPI void $createBackupCopyOfWorld (::std::string const &levelId, ::std::string const &newLevelId, ::std::string const &newName)
MCAPI bool $hasLevelWithId (::std::string const &levelId)
MCAPI::std::string $getLevelIdFromPath (::Core::Path const &fullPath, ::Core::Path const &worldsPath)
MCAPI bool $checkIfLevelIsCorruptOrMissing (::std::string const &levelId)
MCAPI void $addObserver (::LevelListCacheObserver &observer)
MCAPI void $removeObserver (::LevelListCacheObserver &observer)
MCAPI ::Bedrock::UniqueOwnerPointer<::LevelStorage > $createLevelStorage (::Scheduler &scheduler, ::std::string const &levelId, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider, ::std::chrono::nanoseconds const &writeFlushInterval, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv, ::std::unique_ptr<::LevelStorageEventing > levelStorageEventing)
MCAPI ::std::unique_ptr<::LevelLooseFileStorage > $createLevelLooseStorage (::std::string const &levelId, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider)
MCAPI::LevelSummary * $getLevelSummary (::std::string const &levelId)
MCAPI::LevelSummary const * $getLevelSummaryByName (::std::string const &levelName)
MCAPI::LevelSummary * $getOrCreateLevelSummary (::Core::Path const &directory)
MCAPI::LevelData * $getLevelData (::std::string const &levelId)
MCAPI ::Bedrock::NonOwnerPointer<::LevelData > $getLevelDataNonOwnerPointer (::std::string const &levelId)
MCAPI::LevelSummary * $getShallowLevelSummary (::std::string const &levelId)
MCAPI void $getLevelList (::std::vector<::LevelSummary > &dest, bool includeShallowSummaries, bool includePartiallyCopiedLevels, bool includeBetaRetailLevels, bool includeInvalidLevelDataLevels)
MCAPI bool $hasCachedLevels (bool includeShallowSummaries) const
MCAPI void $updateLevelCache (::std::string const &levelId)
MCAPI ::std::unique_ptr<::LevelStorageObserver > $createLevelStorageObserver ()
MCAPI void $onSave (::std::string const &levelId)
MCAPI void $onStorageChanged ()
MCAPI ::Core::PathBuffer<::std::string > const $getBasePath () const
MCAPI ::Core::PathBuffer<::std::string > const $getPathToLevel (::std::string const &levelId) const
MCFOLD void $dtor ()
MCAPI void * $ctor (::std::string name)
MCAPI void * $ctor (::WorkerPool &workerPool, ::Scheduler &scheduler, ::std::string name)
MCAPI ::Bedrock::Threading::Async< void > queue (::std::function< void()> &&callback)
MCAPI void $dtor ()

Static Public Member Functions

static MCAPI void ** $vftable ()
static MCAPI void ** $vftable ()

Public Attributes

::ll::TypedStorage< 8, 8, ::LevelStorageSource & > mLevelStorageSource
::ll::TypedStorage< 8, 64, ::std::unordered_map<::std::string, ::LevelCache > > mCachedLevelData
::ll::TypedStorage< 8, 64, ::std::unordered_map<::std::string, ::LevelSummary > > mCachedUnSyncedLevelData
::ll::TypedStorage< 1, 1, bool > mDiscoverLevels
::ll::TypedStorage< 8, 32, ::Core::Subject<::LevelListCacheObserver, ::Core::SingleThreadedLock > > mSubject
::ll::TypedStorage< 8, 80, ::std::recursive_mutex > mCacheLock
::ll::TypedStorage< 8, 24, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const > const > mAppPlatform
::ll::TypedStorage< 8, 64, ::std::function< bool()> > mCheckIsSafeToFlushCache
::std::shared_ptr<::Bedrock::EnableNonOwnerReferences::ControlBlock > mControlBlock
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::TaskGroup > > mQueueForThreadTaskGroup

Member Function Documentation

◆ addLevel()

virtual void LevelListCache::addLevel ( ::std::string const & levelId,
::LevelData && levelData )
virtual

Implements ILevelListCache.

◆ deleteLevel()

virtual void LevelListCache::deleteLevel ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ refreshLevel()

virtual void LevelListCache::refreshLevel ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ ensureLevelInitialized()

virtual void LevelListCache::ensureLevelInitialized ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ deleteLevelFiles()

virtual void LevelListCache::deleteLevelFiles ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ postDeleteLevel()

virtual void LevelListCache::postDeleteLevel ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ renameLevel()

virtual void LevelListCache::renameLevel ( ::std::string const & levelId,
::std::string const & newLevelName )
virtual

Implements ILevelListCache.

◆ renameAndSaveLevelData()

virtual void LevelListCache::renameAndSaveLevelData ( ::std::string const & levelId,
::std::string const & newLevelName,
::LevelData const & levelData )
virtual

Implements ILevelListCache.

◆ saveLevelData()

virtual void LevelListCache::saveLevelData ( ::std::string const & levelId,
::LevelData const & levelData )
virtual

Implements ILevelListCache.

◆ createBackupCopyOfWorld()

virtual void LevelListCache::createBackupCopyOfWorld ( ::std::string const & levelId,
::std::string const & newLevelId,
::std::string const & newName )
virtual

Implements ILevelListCache.

◆ hasLevelWithId()

virtual bool LevelListCache::hasLevelWithId ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ getLevelIdFromPath()

virtual::std::string LevelListCache::getLevelIdFromPath ( ::Core::Path const & fullPath,
::Core::Path const & worldsPath )
virtual

Implements ILevelListCache.

◆ checkIfLevelIsCorruptOrMissing()

virtual bool LevelListCache::checkIfLevelIsCorruptOrMissing ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ addObserver()

virtual void LevelListCache::addObserver ( ::LevelListCacheObserver & observer)
virtual

Implements ILevelListCache.

◆ removeObserver()

virtual void LevelListCache::removeObserver ( ::LevelListCacheObserver & observer)
virtual

Implements ILevelListCache.

◆ createLevelStorage()

virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage > LevelListCache::createLevelStorage ( ::Scheduler & scheduler,
::std::string const & levelId,
::ContentIdentity const & contentIdentity,
::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const & keyProvider,
::std::chrono::nanoseconds const & writeFlushInterval,
::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv,
::std::unique_ptr<::LevelStorageEventing > levelStorageEventing )
virtual

Implements ILevelListCache.

◆ createLevelLooseStorage()

virtual ::std::unique_ptr<::LevelLooseFileStorage > LevelListCache::createLevelLooseStorage ( ::std::string const & levelId,
::ContentIdentity const & contentIdentity,
::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const & keyProvider )
virtual

Implements ILevelListCache.

◆ getLevelSummary()

virtual::LevelSummary * LevelListCache::getLevelSummary ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ getLevelSummaryByName()

virtual::LevelSummary const * LevelListCache::getLevelSummaryByName ( ::std::string const & levelName)
virtual

Implements ILevelListCache.

◆ getOrCreateLevelSummary()

virtual::LevelSummary * LevelListCache::getOrCreateLevelSummary ( ::Core::Path const & directory)
virtual

Implements ILevelListCache.

◆ getLevelData()

virtual::LevelData * LevelListCache::getLevelData ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ getLevelDataNonOwnerPointer()

virtual ::Bedrock::NonOwnerPointer<::LevelData > LevelListCache::getLevelDataNonOwnerPointer ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ getShallowLevelSummary()

virtual::LevelSummary * LevelListCache::getShallowLevelSummary ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ getLevelList()

virtual void LevelListCache::getLevelList ( ::std::vector<::LevelSummary > & dest,
bool includeShallowSummaries,
bool includePartiallyCopiedLevels,
bool includeBetaRetailLevels,
bool includeInvalidLevelDataLevels )
virtual

Implements ILevelListCache.

◆ hasCachedLevels()

virtual bool LevelListCache::hasCachedLevels ( bool includeShallowSummaries) const
virtual

Implements ILevelListCache.

◆ updateLevelCache()

virtual void LevelListCache::updateLevelCache ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ createLevelStorageObserver()

virtual ::std::unique_ptr<::LevelStorageObserver > LevelListCache::createLevelStorageObserver ( )
virtual

Implements ILevelListCache.

◆ onSave()

virtual void LevelListCache::onSave ( ::std::string const & levelId)
virtual

Implements ILevelListCache.

◆ onStorageChanged()

virtual void LevelListCache::onStorageChanged ( )
virtual

Implements ILevelListCache.

◆ getBasePath()

virtual ::Core::PathBuffer<::std::string > const LevelListCache::getBasePath ( ) const
virtual

Implements ILevelListCache.

◆ getPathToLevel()

virtual ::Core::PathBuffer<::std::string > const LevelListCache::getPathToLevel ( ::std::string const & levelId) const
virtual

Implements ILevelListCache.

◆ $vftable() [1/2]

MCAPI void ** Bedrock::EnableNonOwnerReferences::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable() [2/2]

MCAPI void ** Bedrock::Threading::EnableQueueForMainThread::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

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