Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RResult< void > Class Reference

RResult<void> has no data member and no Inspect() method but instead a Success() factory method.

Definition at line 256 of file RError.hxx.

Public Member Functions

 RResult (const RResult &other)=delete
 
 RResult (RError &&error)
 
 RResult (RResult &&other)=default
 
 ~RResult ()=default
 
RResultForward (RError::RLocation &&sourceLocation)
 Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors.
 
 operator bool ()
 
RResultoperator= (const RResult &other)=delete
 
RResultoperator= (RResult &&other)=default
 
void ThrowOnError ()
 Short-hand method to throw an exception in the case of errors.
 
- Public Member Functions inherited from ROOT::Experimental::RResultBase
 RResultBase (const RResultBase &other)=delete
 
 RResultBase (RResultBase &&other)=default
 
 ~RResultBase () noexcept(false)
 
RErrorGetError ()
 
RResultBaseoperator= (const RResultBase &other)=delete
 
RResultBaseoperator= (RResultBase &&other)=default
 
void Throw ()
 Throws an RException with fError.
 

Static Public Member Functions

static RResult Success ()
 Returns a RResult<void> that captures the successful execution of the function.
 
- Static Public Member Functions inherited from ROOT::Experimental::RResultBase
static RError ForwardError (RResultBase &&result, RError::RLocation &&sourceLocation)
 Used by R__FORWARD_ERROR in order to keep track of the stack trace.
 

Private Member Functions

 RResult ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Experimental::RResultBase
 RResultBase ()=default
 
 RResultBase (RError &&error)
 
bool Check ()
 Used by the RResult<T> bool operator.
 
- Protected Attributes inherited from ROOT::Experimental::RResultBase
std::unique_ptr< RErrorfError
 This is the nullptr for an RResult representing success.
 
bool fIsChecked {false}
 Switches to true once the user of an RResult object checks the object status.
 

#include <ROOT/RError.hxx>

Inheritance diagram for ROOT::Experimental::RResult< void >:
[legend]

Constructor & Destructor Documentation

◆ RResult() [1/4]

ROOT::Experimental::RResult< void >::RResult ( )
privatedefault

◆ RResult() [2/4]

ROOT::Experimental::RResult< void >::RResult ( RError &&  error)
inline

Definition at line 263 of file RError.hxx.

◆ RResult() [3/4]

ROOT::Experimental::RResult< void >::RResult ( const RResult< void > &  other)
delete

◆ RResult() [4/4]

ROOT::Experimental::RResult< void >::RResult ( RResult< void > &&  other)
default

◆ ~RResult()

ROOT::Experimental::RResult< void >::~RResult ( )
default

Member Function Documentation

◆ Forward()

RResult & ROOT::Experimental::RResult< void >::Forward ( RError::RLocation &&  sourceLocation)
inline

Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors.

Definition at line 273 of file RError.hxx.

◆ operator bool()

ROOT::Experimental::RResult< void >::operator bool ( )
inlineexplicit

Definition at line 286 of file RError.hxx.

◆ operator=() [1/2]

RResult & ROOT::Experimental::RResult< void >::operator= ( const RResult< void > &  other)
delete

◆ operator=() [2/2]

RResult & ROOT::Experimental::RResult< void >::operator= ( RResult< void > &&  other)
default

◆ Success()

static RResult ROOT::Experimental::RResult< void >::Success ( )
inlinestatic

Returns a RResult<void> that captures the successful execution of the function.

Definition at line 262 of file RError.hxx.

◆ ThrowOnError()

void ROOT::Experimental::RResult< void >::ThrowOnError ( )
inline

Short-hand method to throw an exception in the case of errors.

Does nothing for successful RResults.

Definition at line 281 of file RError.hxx.

  • core/foundation/v7/inc/ROOT/RError.hxx