plugify 1.0.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
plugify::Ref< T > Class Template Reference

A lightweight reference wrapper for objects of type T. More...

#include <reference_wrapper.hpp>

Public Member Functions

 Ref (T &impl) noexcept
 
 Ref (Ref const &)=default
 
 Ref (Ref &&)=default
 
bool operator== (const Ref &other) const noexcept
 
bool operator== (const T *impl) const noexcept
 
Refoperator= (const Ref &) &=default
 
Refoperator= (const Ref &) &&=delete
 
Refoperator= (Ref &&) &=default
 
Refoperator= (Ref &&) &&=delete
 
 operator bool () const noexcept
 
const void *const GetPtr () const noexcept
 

Protected Attributes

T * _impl
 

Detailed Description

template<typename T>
class plugify::Ref< T >

A lightweight reference wrapper for objects of type T.

This template class provides a reference-like wrapper around an object of type T, ensuring the object can be safely referenced and compared. It handles copying and moving references, while maintaining a non-owning pointer to the wrapped object.

Template Parameters
TThe type of the object to be referenced.

Definition at line 18 of file reference_wrapper.hpp.

Constructor & Destructor Documentation

◆ Ref() [1/2]

template<typename T >
plugify::Ref< T >::Ref ( )
inlinenoexcept

Definition at line 20 of file reference_wrapper.hpp.

◆ Ref() [2/2]

template<typename T >
plugify::Ref< T >::Ref ( T &  impl)
inlinenoexcept

Definition at line 21 of file reference_wrapper.hpp.

Member Function Documentation

◆ GetPtr()

template<typename T >
const void *const plugify::Ref< T >::GetPtr ( ) const
inlinenoexcept

Definition at line 38 of file reference_wrapper.hpp.

◆ operator bool()

template<typename T >
plugify::Ref< T >::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 34 of file reference_wrapper.hpp.

◆ operator==() [1/2]

template<typename T >
bool plugify::Ref< T >::operator== ( const Ref< T > &  other) const
inlinenoexcept

Definition at line 26 of file reference_wrapper.hpp.

◆ operator==() [2/2]

template<typename T >
bool plugify::Ref< T >::operator== ( const T *  impl) const
inlinenoexcept

Definition at line 27 of file reference_wrapper.hpp.

Member Data Documentation

◆ _impl

template<typename T >
T* plugify::Ref< T >::_impl
protected

Definition at line 43 of file reference_wrapper.hpp.


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