cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Public Member Functions | Public Attributes | List of all members
value_and_holder Struct Reference

#include <cast.h>

Public Member Functions

 value_and_holder (instance *i, const detail::type_info *type, size_t vpos, size_t index)
 
 value_and_holder ()=default
 
 value_and_holder (size_t index)
 
template<typename V = void>
V *& value_ptr () const
 
 operator bool () const
 
template<typename H >
H & holder () const
 
bool holder_constructed () const
 
void set_holder_constructed (bool v=true)
 
bool instance_registered () const
 
void set_instance_registered (bool v=true)
 

Public Attributes

instanceinst = nullptr
 
size_t index = 0u
 
const detail::type_info * type = nullptr
 
void ** vh = nullptr
 

Detailed Description

Definition at line 223 of file cast.h.

Constructor & Destructor Documentation

◆ value_and_holder() [1/3]

value_and_holder::value_and_holder ( instance i,
const detail::type_info *  type,
size_t  vpos,
size_t  index 
)
inline

Definition at line 230 of file cast.h.

◆ value_and_holder() [2/3]

value_and_holder::value_and_holder ( )
default

◆ value_and_holder() [3/3]

value_and_holder::value_and_holder ( size_t  index)
inline

Definition at line 239 of file cast.h.

Member Function Documentation

◆ holder()

template<typename H >
H& value_and_holder::holder ( ) const
inline

Definition at line 247 of file cast.h.

◆ holder_constructed()

bool value_and_holder::holder_constructed ( ) const
inline

Definition at line 250 of file cast.h.

◆ instance_registered()

bool value_and_holder::instance_registered ( ) const
inline

Definition at line 263 of file cast.h.

◆ operator bool()

value_and_holder::operator bool ( ) const
inlineexplicit

Definition at line 245 of file cast.h.

◆ set_holder_constructed()

void value_and_holder::set_holder_constructed ( bool  v = true)
inline

Definition at line 255 of file cast.h.

◆ set_instance_registered()

void value_and_holder::set_instance_registered ( bool  v = true)
inline

Definition at line 268 of file cast.h.

◆ value_ptr()

template<typename V = void>
V*& value_and_holder::value_ptr ( ) const
inline

Definition at line 241 of file cast.h.

Member Data Documentation

◆ index

size_t value_and_holder::index = 0u

Definition at line 225 of file cast.h.

◆ inst

instance* value_and_holder::inst = nullptr

Definition at line 224 of file cast.h.

◆ type

const detail::type_info* value_and_holder::type = nullptr

Definition at line 226 of file cast.h.

◆ vh

void** value_and_holder::vh = nullptr

Definition at line 227 of file cast.h.


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