knowL: Knowledge Libraries
Loading...
Searching...
No Matches
knowCore::ReturnValue< _T_ > Class Template Reference

#include <ReturnValue.h>

Public Member Functions

 ReturnValue (const ReturnValue &_rhs)
 
ReturnValueoperator= (const ReturnValue &_rhs)
 
template<typename _TOther_ , template< typename > class _RV_, std::enable_if_t< FollowReturnValuePattern< _RV_ >::value and std::is_convertible_v< _TOther_, _T_ >, bool > = true>
 ReturnValue (const _RV_< _TOther_ > &_rhs)
 
template<typename _TOther_ >
 ReturnValue (const ReturnValue< _TOther_ > &_rhs, std::enable_if_t< std::is_convertible_v< _TOther_, _T_ > > *=nullptr)
 
template<typename _TOther_ >
 ReturnValue (const ReturnValue< _TOther_ > &_rhs, std::enable_if_t< details::is_instance_v< _T_, QSharedPointer > and std::is_same_v< _TOther_, _TOther_ > > *=nullptr)
 
 ReturnValue (const ReturnValueError &_rve)
 
bool success () const
 
const _T_ & value () const
 
const _T_ & expectSuccess () const
 
const QString & message () const
 
template<size_t I>
auto const & get () const &
 
template<size_t I>
auto && get () &&
 
ReturnValue< void > discardValue () const
 

Friends

knowCore::ReturnValue< _T_ > kCrvSuccess (const _T_ &_t)
 

Detailed Description

template<typename _T_>
class knowCore::ReturnValue< _T_ >

Allows to return a value and a status (success or failure) and an error message in case of failure.

Friends And Related Symbol Documentation

◆ kCrvSuccess

template<typename _T_ >
knowCore::ReturnValue< _T_ > kCrvSuccess ( const _T_ & _t)
friend

Call this function to return from a function, after it was successfull and should be returning

Parameters
_t.

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