Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::data::LayeredDataSource Class Referencefinal

#include <LayeredDataSource.hpp>

Inheritance diagram for monopoly::data::LayeredDataSource:
[legend]
Collaboration diagram for monopoly::data::LayeredDataSource:
[legend]

Public Member Functions

std::size_t overrideCount () const noexcept
 
bool overrides (DataId id) const noexcept
 
std::expected< ArchiveItemMetadata, DataError > metadata (DataId id) const override
 
std::expected< LegacyDataType, DataError > initialDataType (DataId id) const override
 
std::expected< std::uint32_t, DataError > initialSize (DataId id) const override
 
std::expected< std::uint32_t, DataError > loadedRawSize (DataId id) const override
 
std::expected< SharedDataBytes, DataError > load (DataId id) const override
 
std::expected< std::size_t, DataError > readRaw (DataId id, std::span< std::byte > destination, std::uint32_t startOffset=0) const override
 
std::expected< bool, DataError > isLoaded (DataId id) const override
 
- Public Member Functions inherited from monopoly::data::DataSource
virtual ~DataSource ()=default
 

Static Public Member Functions

static std::expected< std::shared_ptr< const LayeredDataSource >, DataError > create (std::shared_ptr< const DataSource > fallback, std::span< const DataSourceOverride > overrides)
 

Detailed Description

Definition at line 22 of file LayeredDataSource.hpp.

Member Function Documentation

◆ create()

std::expected< std::shared_ptr< const LayeredDataSource >, DataError > monopoly::data::LayeredDataSource::create ( std::shared_ptr< const DataSource >  fallback,
std::span< const DataSourceOverride >  overrides 
)
static

Definition at line 63 of file LayeredDataSource.cpp.

◆ initialDataType()

std::expected< LegacyDataType, DataError > monopoly::data::LayeredDataSource::initialDataType ( DataId  id) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 164 of file LayeredDataSource.cpp.

◆ initialSize()

std::expected< std::uint32_t, DataError > monopoly::data::LayeredDataSource::initialSize ( DataId  id) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 173 of file LayeredDataSource.cpp.

◆ isLoaded()

std::expected< bool, DataError > monopoly::data::LayeredDataSource::isLoaded ( DataId  id) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 234 of file LayeredDataSource.cpp.

◆ load()

std::expected< SharedDataBytes, DataError > monopoly::data::LayeredDataSource::load ( DataId  id) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 193 of file LayeredDataSource.cpp.

◆ loadedRawSize()

std::expected< std::uint32_t, DataError > monopoly::data::LayeredDataSource::loadedRawSize ( DataId  id) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 183 of file LayeredDataSource.cpp.

◆ metadata()

std::expected< ArchiveItemMetadata, DataError > monopoly::data::LayeredDataSource::metadata ( DataId  id) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 143 of file LayeredDataSource.cpp.

◆ overrideCount()

std::size_t monopoly::data::LayeredDataSource::overrideCount ( ) const
noexcept

Definition at line 113 of file LayeredDataSource.cpp.

◆ overrides()

bool monopoly::data::LayeredDataSource::overrides ( DataId  id) const
noexcept

Definition at line 119 of file LayeredDataSource.cpp.

◆ readRaw()

std::expected< std::size_t, DataError > monopoly::data::LayeredDataSource::readRaw ( DataId  id,
std::span< std::byte >  destination,
std::uint32_t  startOffset = 0 
) const
overridevirtual

Implements monopoly::data::DataSource.

Definition at line 202 of file LayeredDataSource.cpp.


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