boost::openmethod::virtual_ptr<SmartPtr, Registry>

Wide pointer combining a smart pointer to an object and a pointer to its v‐table

Synopsis

template<
    class SmartPtr,
    class Registry>
requires IsSmartPtr<SmartPtr, Registry>
class virtual_ptr<SmartPtr, Registry>;

Description

This specialization of virtual_ptr uses a smart pointer to track the object, instead of a plain pointer.

Types

Name

Description

element_type

Class pointed to by SmartPtr

Member Functions

Name

Description

virtual_ptr [constructor]

Constructors

operator=

Assignment operators

get

Get a pointer to the object

operator‐>

Get a pointer to the object

operator*

Get a reference to the object

pointer

Get a smart pointer to the object

cast

Cast to another virtual_ptr type

vptr

Get the v‐table pointer

Static Member Functions

Name

Description

final

Construct a virtual_ptr from a smart pointer to an object

Template Parameters

Name Description

SmartPtr

A smart pointer type

Registry

The registry in which the underlying class is registered

Created with MrDocs