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)
template<typename U>
requires std::is_base_of_v<T, U>
 PtrResult (PtrResult< U > other)
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 73 of file types.hpp.

Constructor & Destructor Documentation

◆ PtrResult() [1/3]

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

Definition at line 79 of file types.hpp.

Referenced by operator==(), and PtrResult().

Here is the call graph for this function:

◆ PtrResult() [2/3]

template<typename T>
PtrResult ( int errorCode)
inline

Definition at line 80 of file types.hpp.

Here is the call graph for this function:

◆ PtrResult() [3/3]

template<typename T>
template<typename U>
requires std::is_base_of_v<T, U>
PtrResult ( PtrResult< U > other)
inline

Definition at line 83 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 86 of file types.hpp.

◆ operator*() [2/2]

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

Definition at line 91 of file types.hpp.

◆ operator->() [1/2]

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

Definition at line 96 of file types.hpp.

◆ operator->() [2/2]

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

Definition at line 101 of file types.hpp.

◆ get()

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

Definition at line 106 of file types.hpp.

Referenced by process_do_fork(), and PtrResult().

Here is the call graph for this function:

◆ operator==() [1/3]

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

Definition at line 113 of file types.hpp.

◆ operator==() [2/3]

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

Definition at line 118 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 123 of file types.hpp.

◆ operator bool()

template<typename T>
operator bool ( ) const
inlineexplicit

Definition at line 128 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: