Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::WrapperCollectable< T > Class Template Reference

A Collectable wrapper for arbitrary content. More...

#include <bond/vm/collector.h>

Inheritance diagram for Bond::WrapperCollectable< T >:
Bond::Collectable

Public Types

typedef T ContentType
 The type of the wrapped content.

Public Member Functions

template<typename... Args>
 WrapperCollectable (Args &&... args)
 Constructs a WrapperCollectable object, constructing the wrapped content in place.
virtual ~WrapperCollectable ()
 Destroys the WrapperCollectable and its wrapped content.
const T & GetContent () const
 Returns the wrapped content.
T & GetContent ()
 Returns the wrapped content.
Public Member Functions inherited from Bond::Collectable
virtual ~Collectable ()
 Destroys the Collectable and the remainder of the list that follows it.

Detailed Description

template<typename T>
class Bond::WrapperCollectable< T >

A Collectable wrapper for arbitrary content.

This class can be used to register non-Collectable objects with a Collector by storing them as wrapped content.

Template Parameters
TThe type of the wrapped content.

Member Typedef Documentation

◆ ContentType

template<typename T>
typedef T Bond::WrapperCollectable< T >::ContentType

The type of the wrapped content.

Constructor & Destructor Documentation

◆ WrapperCollectable()

template<typename T>
template<typename... Args>
Bond::WrapperCollectable< T >::WrapperCollectable ( Args &&... args)
inlineexplicit

Constructs a WrapperCollectable object, constructing the wrapped content in place.

Parameters
argsArguments forwarded to the wrapped content constructor.

◆ ~WrapperCollectable()

template<typename T>
virtual Bond::WrapperCollectable< T >::~WrapperCollectable ( )
inlinevirtual

Destroys the WrapperCollectable and its wrapped content.

Member Function Documentation

◆ GetContent() [1/2]

template<typename T>
T & Bond::WrapperCollectable< T >::GetContent ( )
inline

Returns the wrapped content.

◆ GetContent() [2/2]

template<typename T>
const T & Bond::WrapperCollectable< T >::GetContent ( ) const
inline

Returns the wrapped content.


The documentation for this class was generated from the following file:
  • include/bond/vm/collector.h