xentara-plugin v1.2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::memory::MemoryResource::BlockHandler Class Referenceabstract

Base class for handlers that perorm certain operations on a block. More...

#include <memory/MemoryResource.hpp>

+ Inheritance diagram for xentara::memory::MemoryResource::BlockHandler:

Classes

class  BlockTraits
 A size and an alignment. More...
 

Public Member Functions

virtual ~BlockHandler ()=0
 Virtual destructor.
 
virtual auto blockTraits () const noexcept -> BlockTraits=0
 Gets the size and alignment info for the block.
 
virtual auto constructAt (void *placement) const -> void=0
 Called by the framework to construct a block in an existing placement.
 
virtual auto constructAt (void *placement, const void *init) const -> void=0
 Called by the framework to construct a block in an existing placement using copy construction.
 
virtual auto destroyAt (void *placement) const noexcept -> void=0
 Called by the framework to destroy the block in an existing placement.
 

Detailed Description

Base class for handlers that perorm certain operations on a block.

Constructor & Destructor Documentation

◆ ~BlockHandler()

xentara::memory::MemoryResource::BlockHandler::~BlockHandler ( )
pure virtualdefault

Virtual destructor.

Member Function Documentation

◆ blockTraits()

virtual auto xentara::memory::MemoryResource::BlockHandler::blockTraits ( ) const -> BlockTraits
pure virtualnoexcept

Gets the size and alignment info for the block.

Implemented in xentara::memory::MemoryBlock< Array >, and xentara::memory::MemoryBlock< Object< Type > >.

◆ constructAt() [1/2]

virtual auto xentara::memory::MemoryResource::BlockHandler::constructAt ( void *  placement) const -> void
pure virtual

Called by the framework to construct a block in an existing placement.

Parameters
placementThe placement of the block

Implemented in xentara::memory::MemoryBlock< Array >, and xentara::memory::MemoryBlock< Object< Type > >.

◆ constructAt() [2/2]

virtual auto xentara::memory::MemoryResource::BlockHandler::constructAt ( void *  placement,
const void *  init 
) const -> void
pure virtual

Called by the framework to construct a block in an existing placement using copy construction.

Parameters
placementThe placement of the block
initThe placement of the block to copy. The block is guaranteed to have the same handler.

Implemented in xentara::memory::MemoryBlock< Array >, and xentara::memory::MemoryBlock< Object< Type > >.

◆ destroyAt()

virtual auto xentara::memory::MemoryResource::BlockHandler::destroyAt ( void *  placement) const -> void
pure virtualnoexcept

Called by the framework to destroy the block in an existing placement.

Parameters
placementThe placement of the block

Implemented in xentara::memory::MemoryBlock< Array >, and xentara::memory::MemoryBlock< Object< Type > >.