ManaPlus
Public Member Functions | Data Fields
mse::msev_pointer< _Ty > Class Template Reference

#include <msemsevector.h>

Public Member Functions

 msev_pointer ()
 
 msev_pointer (_Ty *ptr)
 
 msev_pointer (const msev_pointer< _Ty > &src)
 
_Ty & operator* () const
 
_Ty * operator-> () const
 
msev_pointer< _Ty > & operator= (_Ty *ptr)
 
bool operator== (const msev_pointer _Right_cref) const
 
bool operator!= (const msev_pointer _Right_cref) const
 
bool operator== (const _Ty *_Right_cref) const
 
bool operator!= (const _Ty *_Right_cref) const
 
bool operator! () const
 
 operator bool () const
 
 operator _Ty * () const
 

Data Fields

_Ty * m_ptr
 

Detailed Description

template<typename _Ty>
class mse::msev_pointer< _Ty >

Definition at line 78 of file msemsevector.h.

Constructor & Destructor Documentation

◆ msev_pointer() [1/3]

template<typename _Ty >
mse::msev_pointer< _Ty >::msev_pointer ( )
inline

Definition at line 80 of file msemsevector.h.

80 : m_ptr(nullptr) {}

◆ msev_pointer() [2/3]

template<typename _Ty >
mse::msev_pointer< _Ty >::msev_pointer ( _Ty *  ptr)
inline

Definition at line 81 of file msemsevector.h.

81 : m_ptr(ptr) {}

◆ msev_pointer() [3/3]

template<typename _Ty >
mse::msev_pointer< _Ty >::msev_pointer ( const msev_pointer< _Ty > &  src)
inline

Definition at line 82 of file msemsevector.h.

82 : m_ptr(src.m_ptr) {}

Member Function Documentation

◆ operator _Ty *()

template<typename _Ty >
mse::msev_pointer< _Ty >::operator _Ty * ( ) const
inline

Definition at line 108 of file msemsevector.h.

108 { return m_ptr; }

References mse::msev_pointer< _Ty >::m_ptr.

◆ operator bool()

template<typename _Ty >
mse::msev_pointer< _Ty >::operator bool ( ) const
inline

Definition at line 106 of file msemsevector.h.

106 { return (m_ptr != nullptr); }

References mse::msev_pointer< _Ty >::m_ptr.

◆ operator!()

template<typename _Ty >
bool mse::msev_pointer< _Ty >::operator! ( ) const
inline

Definition at line 105 of file msemsevector.h.

105 { return (!m_ptr); }

References mse::msev_pointer< _Ty >::m_ptr.

◆ operator!=() [1/2]

template<typename _Ty >
bool mse::msev_pointer< _Ty >::operator!= ( const _Ty *  _Right_cref) const
inline

Definition at line 103 of file msemsevector.h.

103 { return (!((*this) == _Right_cref)); }

◆ operator!=() [2/2]

template<typename _Ty >
bool mse::msev_pointer< _Ty >::operator!= ( const msev_pointer< _Ty >  _Right_cref) const
inline

Definition at line 101 of file msemsevector.h.

101 { return (!((*this) == _Right_cref)); }

◆ operator*()

template<typename _Ty >
_Ty& mse::msev_pointer< _Ty >::operator* ( ) const
inline

Definition at line 84 of file msemsevector.h.

84  {
85 #ifndef MSE_DISABLE_MSEAR_POINTER_CHECKS
86  if (nullptr == m_ptr) { MSE_THROW(msevector_null_dereference_error("attempt to dereference null pointer - mse::msev_pointer")); }
87 #endif /*MSE_DISABLE_MSEAR_POINTER_CHECKS*/
88  return (*m_ptr);
89  }
#define MSE_THROW(x)
Definition: msemsevector.h:44

References mse::msev_pointer< _Ty >::m_ptr, and MSE_THROW.

◆ operator->()

template<typename _Ty >
_Ty* mse::msev_pointer< _Ty >::operator-> ( ) const
inline

Definition at line 90 of file msemsevector.h.

90  {
91 #ifndef MSE_DISABLE_MSEAR_POINTER_CHECKS
92  if (nullptr == m_ptr) { MSE_THROW(msevector_null_dereference_error("attempt to dereference null pointer - mse::msev_pointer")); }
93 #endif /*MSE_DISABLE_MSEAR_POINTER_CHECKS*/
94  return m_ptr;
95  }

References mse::msev_pointer< _Ty >::m_ptr, and MSE_THROW.

◆ operator=()

template<typename _Ty >
msev_pointer<_Ty>& mse::msev_pointer< _Ty >::operator= ( _Ty *  ptr)
inline

Definition at line 96 of file msemsevector.h.

96  {
97  m_ptr = ptr;
98  return (*this);
99  }

References mse::msev_pointer< _Ty >::m_ptr.

◆ operator==() [1/2]

template<typename _Ty >
bool mse::msev_pointer< _Ty >::operator== ( const _Ty *  _Right_cref) const
inline

Definition at line 102 of file msemsevector.h.

102 { return (_Right_cref == m_ptr); }

References mse::msev_pointer< _Ty >::m_ptr.

◆ operator==() [2/2]

template<typename _Ty >
bool mse::msev_pointer< _Ty >::operator== ( const msev_pointer< _Ty >  _Right_cref) const
inline

Definition at line 100 of file msemsevector.h.

100 { return (_Right_cref.m_ptr == m_ptr); }

References mse::msev_pointer< _Ty >::m_ptr.

Field Documentation

◆ m_ptr

template<typename _Ty >
_Ty* mse::msev_pointer< _Ty >::m_ptr

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