MOS Source Code
Loading...
Searching...
No Matches
PtrResult< T > Struct Template Reference

#include <types.hpp>

+ Inheritance diagram for PtrResult< T >:
+ Collaboration diagram for PtrResult< T >:

Public Member Functions

 PtrResult (T *value)
 
 PtrResult (int errorCode)
 
std::add_lvalue_reference< T >::type operator* ()
 
const std::add_lvalue_reference< T >::type & operator* () const
 
T * operator-> ()
 
const T * operator-> () const
 
T * get () const
 
bool operator== (const std::nullptr_t) const
 
bool operator== (const PtrResult< T > &other) const
 
bool operator== (const T *other) const
 
 operator bool () const
 
- Public Member Functions inherited from PtrResultBase
virtual bool isErr () const final
 
virtual long getErr () const final
 
 operator bool () const
 

Private Attributes

T *const value
 

Additional Inherited Members

- Protected Member Functions inherited from PtrResultBase
 PtrResultBase ()
 
 PtrResultBase (int errorCode)
 
- Protected Attributes inherited from PtrResultBase
const int errorCode
 

Detailed Description

template<typename T>
struct PtrResult< T >

Definition at line 71 of file types.hpp.

Constructor & Destructor Documentation

◆ PtrResult() [1/2]

template<typename T>
PtrResult ( T * value)
inline

Definition at line 77 of file types.hpp.

Referenced by operator==().

+ Here is the call graph for this function:

◆ PtrResult() [2/2]

template<typename T>
PtrResult ( int errorCode)
inline

Definition at line 78 of file types.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ operator*() [1/2]

template<typename T>
std::add_lvalue_reference< T >::type operator* ( )
inline

Definition at line 81 of file types.hpp.

◆ operator*() [2/2]

template<typename T>
const std::add_lvalue_reference< T >::type & operator* ( ) const
inline

Definition at line 86 of file types.hpp.

◆ operator->() [1/2]

template<typename T>
T * operator-> ( )
inline

Definition at line 91 of file types.hpp.

◆ operator->() [2/2]

template<typename T>
const T * operator-> ( ) const
inline

Definition at line 96 of file types.hpp.

◆ get()

template<typename T>
T * get ( ) const
inline

Definition at line 101 of file types.hpp.

Referenced by process_do_fork().

◆ operator==() [1/3]

template<typename T>
bool operator== ( const std::nullptr_t ) const
inline

Definition at line 106 of file types.hpp.

◆ operator==() [2/3]

template<typename T>
bool operator== ( const PtrResult< T > & other) const
inline

Definition at line 111 of file types.hpp.

+ Here is the call graph for this function:

◆ operator==() [3/3]

template<typename T>
bool operator== ( const T * other) const
inline

Definition at line 116 of file types.hpp.

◆ operator bool()

template<typename T>
operator bool ( ) const
inlineexplicit

Definition at line 121 of file types.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ value

template<typename T>
T* const value
private

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