guanaqo 1.0.0-alpha.27
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::BasicVTable Struct Reference

#include <guanaqo/type-erasure.hpp>

Detailed Description

Struct that stores pointers to functions to copy, move or destroy a polymorphic object.

Inherit from this struct to add useful functions.

Definition at line 135 of file type-erasure.hpp.

Collaboration diagram for guanaqo::BasicVTable:

Public Member Functions

 BasicVTable ()=default
template<class T>
 BasicVTable (std::in_place_t, T &) noexcept
void copy (const void *self, void *storage) const
void move (void *self, void *storage) const
void destroy (void *self) const

Public Attributes

const std::type_info * type = &typeid(void)
 The original type of the stored object.
const CopyMoveDestroyVTablecopy_move_destroy_functions = nullptr
 Function pointers for copying, moving and destroying the stored object.

Constructor & Destructor Documentation

◆ BasicVTable() [1/2]

guanaqo::BasicVTable::BasicVTable ( )
default

◆ BasicVTable() [2/2]

template<class T>
guanaqo::BasicVTable::BasicVTable ( std::in_place_t ,
T &  )
inlinenoexcept

Definition at line 144 of file type-erasure.hpp.

Member Function Documentation

◆ copy()

void guanaqo::BasicVTable::copy ( const void * self,
void * storage ) const
inline

Definition at line 149 of file type-erasure.hpp.

◆ move()

void guanaqo::BasicVTable::move ( void * self,
void * storage ) const
inline

Definition at line 152 of file type-erasure.hpp.

◆ destroy()

void guanaqo::BasicVTable::destroy ( void * self) const
inline

Definition at line 155 of file type-erasure.hpp.

Member Data Documentation

◆ type

const std::type_info* guanaqo::BasicVTable::type = &typeid(void)

The original type of the stored object.

Definition at line 137 of file type-erasure.hpp.

◆ copy_move_destroy_functions

const CopyMoveDestroyVTable* guanaqo::BasicVTable::copy_move_destroy_functions = nullptr

Function pointers for copying, moving and destroying the stored object.

Definition at line 139 of file type-erasure.hpp.


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