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

#include <LegacyChunk.hpp>

Public Member Functions

 LegacyChunkReader (std::span< const std::byte > bytes) noexcept
 
 LegacyChunkReader (SharedDataBytes bytes) noexcept
 
std::expected< ChunkInfo, ChunkError > descend (std::uint8_t findId=NullStandardId)
 
std::expected< void, ChunkError > ascend ()
 
std::expected< std::span< const std::byte >, ChunkError > map (std::size_t requestedBytes)
 
std::expected< std::size_t, ChunkError > read (std::span< std::byte > destination)
 
std::expected< void, ChunkError > seek (std::size_t absoluteOffset)
 
std::size_t currentOffset () const noexcept
 
std::size_t level () const noexcept
 
std::uint8_t idForLevel (std::size_t level) const noexcept
 
std::size_t dataSizeForLevel (std::size_t level) const noexcept
 
std::size_t dataStartForLevel (std::size_t level) const noexcept
 
std::size_t remaining () const noexcept
 

Static Public Attributes

static constexpr std::size_t PhysicalHeaderSize = 4
 
static constexpr std::size_t MaximumLevels = 8
 
static constexpr std::uint8_t NullStandardId = 0
 
static constexpr std::uint8_t NullInContextId = 128
 

Detailed Description

Definition at line 52 of file LegacyChunk.hpp.

Constructor & Destructor Documentation

◆ LegacyChunkReader() [1/2]

monopoly::data::LegacyChunkReader::LegacyChunkReader ( std::span< const std::byte >  bytes)
explicitnoexcept

Definition at line 47 of file LegacyChunk.cpp.

◆ LegacyChunkReader() [2/2]

monopoly::data::LegacyChunkReader::LegacyChunkReader ( SharedDataBytes  bytes)
explicitnoexcept

Definition at line 55 of file LegacyChunk.cpp.

Member Function Documentation

◆ ascend()

std::expected< void, ChunkError > monopoly::data::LegacyChunkReader::ascend ( )

Definition at line 168 of file LegacyChunk.cpp.

◆ currentOffset()

std::size_t monopoly::data::LegacyChunkReader::currentOffset ( ) const
noexcept

Definition at line 228 of file LegacyChunk.cpp.

◆ dataSizeForLevel()

std::size_t monopoly::data::LegacyChunkReader::dataSizeForLevel ( std::size_t  level) const
noexcept

Definition at line 247 of file LegacyChunk.cpp.

◆ dataStartForLevel()

std::size_t monopoly::data::LegacyChunkReader::dataStartForLevel ( std::size_t  level) const
noexcept

Definition at line 255 of file LegacyChunk.cpp.

◆ descend()

std::expected< ChunkInfo, ChunkError > monopoly::data::LegacyChunkReader::descend ( std::uint8_t  findId = NullStandardId)

Definition at line 73 of file LegacyChunk.cpp.

◆ idForLevel()

std::uint8_t monopoly::data::LegacyChunkReader::idForLevel ( std::size_t  level) const
noexcept

Definition at line 240 of file LegacyChunk.cpp.

◆ level()

std::size_t monopoly::data::LegacyChunkReader::level ( ) const
noexcept

Definition at line 234 of file LegacyChunk.cpp.

◆ map()

std::expected< std::span< const std::byte >, ChunkError > monopoly::data::LegacyChunkReader::map ( std::size_t  requestedBytes)

Definition at line 185 of file LegacyChunk.cpp.

◆ read()

std::expected< std::size_t, ChunkError > monopoly::data::LegacyChunkReader::read ( std::span< std::byte >  destination)

Definition at line 194 of file LegacyChunk.cpp.

◆ remaining()

std::size_t monopoly::data::LegacyChunkReader::remaining ( ) const
noexcept

Definition at line 262 of file LegacyChunk.cpp.

◆ seek()

std::expected< void, ChunkError > monopoly::data::LegacyChunkReader::seek ( std::size_t  absoluteOffset)

Definition at line 209 of file LegacyChunk.cpp.

Member Data Documentation

◆ MaximumLevels

constexpr std::size_t monopoly::data::LegacyChunkReader::MaximumLevels = 8
staticconstexpr

Definition at line 56 of file LegacyChunk.hpp.

◆ NullInContextId

constexpr std::uint8_t monopoly::data::LegacyChunkReader::NullInContextId = 128
staticconstexpr

Definition at line 58 of file LegacyChunk.hpp.

◆ NullStandardId

constexpr std::uint8_t monopoly::data::LegacyChunkReader::NullStandardId = 0
staticconstexpr

Definition at line 57 of file LegacyChunk.hpp.

◆ PhysicalHeaderSize

constexpr std::size_t monopoly::data::LegacyChunkReader::PhysicalHeaderSize = 4
staticconstexpr

Definition at line 55 of file LegacyChunk.hpp.


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