PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::detail::ScratchSlab Class Reference

#include <scratch_slab.hpp>

Public Member Functions

 ScratchSlab (const ScratchManifest &manifest)
 
 ~ScratchSlab ()
 
 ScratchSlab (const ScratchSlab &)=delete
 
ScratchSlab & operator= (const ScratchSlab &)=delete
 
 ScratchSlab (ScratchSlab &&)=delete
 
ScratchSlab & operator= (ScratchSlab &&)=delete
 
const ScratchManifest & manifest () const noexcept
 
const Layout & layout () const noexcept
 
const std::array< Region, kScratchRegionCount > & regions () const noexcept
 
const Region & region (ScratchResource resource) const
 
bool can_extend (ScratchResource resource, std::uint64_t new_extent) const noexcept
 
bool can_extend (const Region &item, std::uint64_t new_extent) const
 
void require_extend (ScratchResource resource, std::uint64_t new_extent) const
 
void require_extend (const Region &item, std::uint64_t new_extent) const
 
void extend (ScratchResource resource, std::uint64_t new_extent)
 
void read_at (ScratchResource resource, std::uint64_t offset, void *destination, std::size_t length) const
 
void read_at (const Region &item, std::uint64_t offset, void *destination, std::size_t length) const
 
void write_at (ScratchResource resource, std::uint64_t offset, const void *source, std::size_t length)
 
void write_at (const Region &item, std::uint64_t offset, const void *source, std::size_t length)
 
void zero () noexcept
 
void zero (ScratchResource resource)
 
void reset () noexcept
 
void reset (ScratchResource resource)
 

Detailed Description

Definition at line 110 of file scratch_slab.hpp.

Constructor & Destructor Documentation

◆ ScratchSlab() [1/3]

pineforge::detail::ScratchSlab::ScratchSlab ( const ScratchManifest & manifest)
inlineexplicit

◆ ~ScratchSlab()

pineforge::detail::ScratchSlab::~ScratchSlab ( )
inline

Definition at line 124 of file scratch_slab.hpp.

References pineforge::detail::kScratchPageSize.

◆ ScratchSlab() [2/3]

pineforge::detail::ScratchSlab::ScratchSlab ( const ScratchSlab & )
delete

References ScratchSlab().

◆ ScratchSlab() [3/3]

pineforge::detail::ScratchSlab::ScratchSlab ( ScratchSlab && )
delete

References ScratchSlab().

Member Function Documentation

◆ operator=() [1/2]

ScratchSlab & pineforge::detail::ScratchSlab::operator= ( const ScratchSlab & )
delete

References ScratchSlab().

◆ operator=() [2/2]

ScratchSlab & pineforge::detail::ScratchSlab::operator= ( ScratchSlab && )
delete

References ScratchSlab().

◆ manifest()

const ScratchManifest & pineforge::detail::ScratchSlab::manifest ( ) const
inlinenoexcept

Definition at line 133 of file scratch_slab.hpp.

Referenced by ScratchSlab().

◆ layout()

const Layout & pineforge::detail::ScratchSlab::layout ( ) const
inlinenoexcept

Definition at line 134 of file scratch_slab.hpp.

◆ regions()

const std::array< Region, kScratchRegionCount > & pineforge::detail::ScratchSlab::regions ( ) const
inlinenoexcept

Definition at line 135 of file scratch_slab.hpp.

◆ region()

const Region & pineforge::detail::ScratchSlab::region ( ScratchResource resource) const
inline

Definition at line 136 of file scratch_slab.hpp.

References pineforge::resource.

Referenced by read_at().

◆ can_extend() [1/2]

bool pineforge::detail::ScratchSlab::can_extend ( ScratchResource resource,
std::uint64_t new_extent ) const
inlinenoexcept

Definition at line 140 of file scratch_slab.hpp.

References pineforge::detail::kScratchRegionCount, and pineforge::resource.

Referenced by can_extend(), and require_extend().

◆ can_extend() [2/2]

bool pineforge::detail::ScratchSlab::can_extend ( const Region & item,
std::uint64_t new_extent ) const
inline

Definition at line 145 of file scratch_slab.hpp.

References can_extend(), and pineforge::detail::Region::resource.

◆ require_extend() [1/2]

void pineforge::detail::ScratchSlab::require_extend ( ScratchResource resource,
std::uint64_t new_extent ) const
inline

Definition at line 149 of file scratch_slab.hpp.

References can_extend(), and pineforge::resource.

Referenced by extend(), and require_extend().

◆ require_extend() [2/2]

void pineforge::detail::ScratchSlab::require_extend ( const Region & item,
std::uint64_t new_extent ) const
inline

Definition at line 152 of file scratch_slab.hpp.

References require_extend(), and pineforge::detail::Region::resource.

◆ extend()

void pineforge::detail::ScratchSlab::extend ( ScratchResource resource,
std::uint64_t new_extent )
inline

Definition at line 159 of file scratch_slab.hpp.

References require_extend(), and pineforge::resource.

◆ read_at() [1/2]

void pineforge::detail::ScratchSlab::read_at ( ScratchResource resource,
std::uint64_t offset,
void * destination,
std::size_t length ) const
inline

Definition at line 169 of file scratch_slab.hpp.

References region(), and pineforge::resource.

Referenced by read_at(), and pineforge::detail::IdPairSlabFold::update().

◆ read_at() [2/2]

void pineforge::detail::ScratchSlab::read_at ( const Region & item,
std::uint64_t offset,
void * destination,
std::size_t length ) const
inline

Definition at line 179 of file scratch_slab.hpp.

References read_at(), and pineforge::detail::Region::resource.

◆ write_at() [1/2]

void pineforge::detail::ScratchSlab::write_at ( ScratchResource resource,
std::uint64_t offset,
const void * source,
std::size_t length )
inline

Definition at line 184 of file scratch_slab.hpp.

References pineforge::resource.

Referenced by pineforge::detail::IdPairSlabFold::update(), and write_at().

◆ write_at() [2/2]

void pineforge::detail::ScratchSlab::write_at ( const Region & item,
std::uint64_t offset,
const void * source,
std::size_t length )
inline

Definition at line 195 of file scratch_slab.hpp.

References pineforge::detail::Region::resource, and write_at().

◆ zero() [1/2]

void pineforge::detail::ScratchSlab::zero ( )
inlinenoexcept

Definition at line 203 of file scratch_slab.hpp.

Referenced by reset(), reset(), and ScratchSlab().

◆ zero() [2/2]

void pineforge::detail::ScratchSlab::zero ( ScratchResource resource)
inline

Definition at line 206 of file scratch_slab.hpp.

References pineforge::resource.

◆ reset() [1/2]

void pineforge::detail::ScratchSlab::reset ( )
inlinenoexcept

Definition at line 211 of file scratch_slab.hpp.

References zero().

◆ reset() [2/2]

void pineforge::detail::ScratchSlab::reset ( ScratchResource resource)
inline

Definition at line 215 of file scratch_slab.hpp.

References pineforge::resource, and zero().


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