mn::pointer::basic_any_ptr< T > Class Template Reference

#include <mn_any_ptr.hpp>

Public Types

using element_type = T
 
using size_type = size_t
 
using pointer = T *
 
using const_pointer = const T *
 
using self_type = basic_any_ptr< T >
 

Public Member Functions

 basic_any_ptr ()
 Construct a new basic any ptr object. More...
 
 basic_any_ptr (const_pointer pObject)
 Construct a new basic any ptr object. More...
 
 basic_any_ptr (const basic_any_ptr &other)
 Construct a new basic any ptr object from a copy. More...
 
template<typename U >
 basic_any_ptr (const basic_any_ptr< U > &other)
 Construct a new basic any ptr object from a copy. More...
 
const self_typeoperator= (const self_type &other)
 Assignment Operator. More...
 
template<class U >
const self_typeoperator= (const basic_any_ptr< U > &other)
 Assignment Operator. More...
 
template<class U >
const self_typeoperator= (const U *pObject)
 Assign from object pointer. More...
 
 operator const_pointer ()
 
template<class U >
 operator const U * ()
 Implicit cast to non-const object pointer. More...
 
bool is_null ()
 Is the pointer null. More...
 

Private Attributes

const_pointer m_pObject
 

Member Typedef Documentation

◆ const_pointer

template<typename T >
using mn::pointer::basic_any_ptr< T >::const_pointer = const T*

◆ element_type

template<typename T >
using mn::pointer::basic_any_ptr< T >::element_type = T

◆ pointer

template<typename T >
using mn::pointer::basic_any_ptr< T >::pointer = T*

◆ self_type

template<typename T >
using mn::pointer::basic_any_ptr< T >::self_type = basic_any_ptr<T>

◆ size_type

template<typename T >
using mn::pointer::basic_any_ptr< T >::size_type = size_t

Constructor & Destructor Documentation

◆ basic_any_ptr() [1/4]

template<typename T >
mn::pointer::basic_any_ptr< T >::basic_any_ptr ( )
inline

Construct a new basic any ptr object.

◆ basic_any_ptr() [2/4]

template<typename T >
mn::pointer::basic_any_ptr< T >::basic_any_ptr ( const_pointer  pObject)
inline

Construct a new basic any ptr object.

◆ basic_any_ptr() [3/4]

template<typename T >
mn::pointer::basic_any_ptr< T >::basic_any_ptr ( const basic_any_ptr< T > &  other)
inline

Construct a new basic any ptr object from a copy.

◆ basic_any_ptr() [4/4]

template<typename T >
template<typename U >
mn::pointer::basic_any_ptr< T >::basic_any_ptr ( const basic_any_ptr< U > &  other)
inline

Construct a new basic any ptr object from a copy.

Template Parameters
UThe type of the other any_ptr type
Parameters
otherThe copy

Member Function Documentation

◆ is_null()

template<typename T >
bool mn::pointer::basic_any_ptr< T >::is_null ( )
inline

Is the pointer null.

Returns
true The pointer hold a null pointer
false The pointer is set

◆ operator const U *()

template<typename T >
template<class U >
mn::pointer::basic_any_ptr< T >::operator const U * ( )
inline

Implicit cast to non-const object pointer.

◆ operator const_pointer()

template<typename T >
mn::pointer::basic_any_ptr< T >::operator const_pointer ( )
inline

◆ operator=() [1/3]

template<typename T >
template<class U >
const self_type& mn::pointer::basic_any_ptr< T >::operator= ( const basic_any_ptr< U > &  other)
inline

Assignment Operator.

Template Parameters
UThe type of the other any_ptr type
Parameters
otherThe assignment object
Returns
self

◆ operator=() [2/3]

template<typename T >
const self_type& mn::pointer::basic_any_ptr< T >::operator= ( const self_type other)
inline

Assignment Operator.

Parameters
otherThe assignment object
Returns
self

◆ operator=() [3/3]

template<typename T >
template<class U >
const self_type& mn::pointer::basic_any_ptr< T >::operator= ( const U *  pObject)
inline

Assign from object pointer.

Member Data Documentation

◆ m_pObject

template<typename T >
const_pointer mn::pointer::basic_any_ptr< T >::m_pObject
private

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