Base Framework
Public Member Functions | List of all members
StrictPointer< TYPE > Class Template Reference

Strict pointer. More...

#include <base/mem/StrictPointer.h>

Inherits NotCopyable.

Public Member Functions

 StrictPointer (TYPE *_value)
 
bool operator== (const StrictPointer &compare) const noexcept
 
bool operator!= (const StrictPointer &compare) const noexcept
 
TYPE * operator-> () noexcept
 
const TYPE * operator-> () const noexcept
 

Detailed Description

template<class TYPE>
class StrictPointer< TYPE >

Strict pointer.

Automation pointer which cannot be copied and which is protected from direct access. The automation pointer may only be used with valid pointers (i.e. not nullptr).

Version
1.0

Constructor & Destructor Documentation

◆ StrictPointer()

template<class TYPE >
StrictPointer< TYPE >::StrictPointer ( TYPE *  _value)
inline

Initializes the automation pointer.

Parameters
valueThe object pointer to be automated.

Member Function Documentation

◆ operator!=()

template<class TYPE >
bool StrictPointer< TYPE >::operator!= ( const StrictPointer< TYPE > &  compare) const
inlinenoexcept

Returns true if the pointers are non-equal.

◆ operator->() [1/2]

template<class TYPE >
const TYPE* StrictPointer< TYPE >::operator-> ( ) const
inlinenoexcept

Returns object for non-modifying access.

◆ operator->() [2/2]

template<class TYPE >
TYPE* StrictPointer< TYPE >::operator-> ( )
inlinenoexcept

Returns object for modifying access.

◆ operator==()

template<class TYPE >
bool StrictPointer< TYPE >::operator== ( const StrictPointer< TYPE > &  compare) const
inlinenoexcept

Returns true if the pointers are equal.