RPNX::QueryGraph
Typed, memoized, concurrent query evaluation for C++23
Loading...
Searching...
No Matches
rpnx::querygraph::result< void > Class Reference

Pending/value/error state specialization for operations returning no value. More...

#include <querygraph.hpp>

Public Member Functions

 result ()=default
 Construct a pending result.
 
 result (std::exception_ptr exception)
 Construct a failed result from an unexpected exception.
 
void test () const
 Rethrow the stored error, if one exists.
 
void get () const
 Verify successful completion or throw the stored error.
 
void value () const
 Alias for get().
 
void set_value ()
 Replace any prior state with successful completion.
 
void set_error (error_result error)
 Replace any prior state with error.
 
void set_error (std::exception_ptr exception)
 Replace any prior state with an unexpected exception.
 
void set_exception (std::exception_ptr exception)
 Compatibility spelling for set_error(exception).
 
bool has_result () const
 Return whether evaluation produced success or an error.
 
bool has_value () const
 Return whether evaluation completed successfully.
 
bool has_error () const
 Return whether evaluation completed with an error.
 
bool has_exception () const
 Compatibility spelling for has_error().
 
bool has_canonical_error () const
 Return whether the result contains a canonical error.
 
bool has_unexpected_exception () const
 Return whether the result contains an unexpected exception.
 
error_result const & get_error_result () const
 Return the stored error state without throwing.
 
std::exception_ptr get_error () const
 Materialize the stored error as an exception pointer.
 
status result_status () const
 Return the status used when serializing this result.
 
 operator bool () const
 Return whether evaluation has reached any terminal state.
 
 result ()=default
 Construct a pending result.
 
 result (void value)
 Construct a completed result from value.
 
 result (std::exception_ptr exception)
 Construct a failed result from an unexpected exception.
 
void test () const
 Rethrow the stored error, if one exists.
 
void & get () &
 Return the value or throw the stored error.
 
void const & get () const &
 Return the value or throw the stored error.
 
void && get () &&
 Return the value or throw the stored error.
 
void const && get () const &&
 Return the value or throw the stored error.
 
void & value () &
 Alias for get() preserving the value category.
 
void const & value () const &
 Alias for get() preserving the value category.
 
void && value () &&
 Alias for get() preserving the value category.
 
void const && value () const &&
 Alias for get() preserving the value category.
 
void set_value (void value)
 Replace any prior state with a completed value.
 
void set_error (error_result error)
 Replace any prior state with error.
 
void set_error (std::exception_ptr exception)
 Replace any prior state with an unexpected exception.
 
void set_exception (std::exception_ptr exception)
 Compatibility spelling for set_error(exception).
 
bool has_result () const
 Return whether evaluation produced either a value or an error.
 
bool has_value () const
 Return whether evaluation completed successfully.
 
bool has_error () const
 Return whether evaluation completed with an error.
 
bool has_exception () const
 Compatibility spelling for has_error().
 
bool has_canonical_error () const
 Return whether the result contains a canonical error.
 
bool has_unexpected_exception () const
 Return whether the result contains an unexpected exception.
 
error_result const & get_error_result () const
 Return the stored error state without throwing.
 
std::exception_ptr get_error () const
 Materialize the stored error as an exception pointer.
 
status result_status () const
 Return the status used when serializing this result.
 
 operator bool () const
 Return whether evaluation has reached any terminal state.
 

Detailed Description

Pending/value/error state specialization for operations returning no value.

Definition at line 690 of file querygraph.hpp.

Constructor & Destructor Documentation

◆ result() [1/3]

rpnx::querygraph::result< void >::result ( std::exception_ptr exception)
inline

Construct a failed result from an unexpected exception.

Definition at line 700 of file querygraph.hpp.

◆ result() [2/3]

rpnx::querygraph::result< void >::result ( void value)
inline

Construct a completed result from value.

Definition at line 523 of file querygraph.hpp.

◆ result() [3/3]

rpnx::querygraph::result< void >::result ( std::exception_ptr exception)
inline

Construct a failed result from an unexpected exception.

Definition at line 528 of file querygraph.hpp.

Member Function Documentation

◆ get() [1/5]

void & rpnx::querygraph::result< void >::get ( ) &
inline

Return the value or throw the stored error.

Definition at line 542 of file querygraph.hpp.

◆ get() [2/5]

void && rpnx::querygraph::result< void >::get ( ) &&
inline

Return the value or throw the stored error.

Definition at line 558 of file querygraph.hpp.

◆ get() [3/5]

void rpnx::querygraph::result< void >::get ( ) const
inline

Verify successful completion or throw the stored error.

Definition at line 714 of file querygraph.hpp.

References rpnx::querygraph::result< T >::test().

◆ get() [4/5]

void const & rpnx::querygraph::result< void >::get ( ) const &
inline

Return the value or throw the stored error.

Definition at line 550 of file querygraph.hpp.

◆ get() [5/5]

void const && rpnx::querygraph::result< void >::get ( ) const &&
inline

Return the value or throw the stored error.

Definition at line 566 of file querygraph.hpp.

◆ get_error() [1/2]

std::exception_ptr rpnx::querygraph::result< void >::get_error ( ) const
inline

Materialize the stored error as an exception pointer.

Definition at line 666 of file querygraph.hpp.

◆ get_error() [2/2]

std::exception_ptr rpnx::querygraph::result< void >::get_error ( ) const
inline

Materialize the stored error as an exception pointer.

Definition at line 798 of file querygraph.hpp.

◆ get_error_result() [1/2]

error_result const & rpnx::querygraph::result< void >::get_error_result ( ) const
inline

Return the stored error state without throwing.

Definition at line 660 of file querygraph.hpp.

◆ get_error_result() [2/2]

error_result const & rpnx::querygraph::result< void >::get_error_result ( ) const
inline

Return the stored error state without throwing.

Definition at line 792 of file querygraph.hpp.

◆ has_canonical_error() [1/2]

bool rpnx::querygraph::result< void >::has_canonical_error ( ) const
inline

Return whether the result contains a canonical error.

Definition at line 648 of file querygraph.hpp.

◆ has_canonical_error() [2/2]

bool rpnx::querygraph::result< void >::has_canonical_error ( ) const
inline

Return whether the result contains a canonical error.

Definition at line 780 of file querygraph.hpp.

◆ has_error() [1/2]

bool rpnx::querygraph::result< void >::has_error ( ) const
inline

Return whether evaluation completed with an error.

Definition at line 636 of file querygraph.hpp.

◆ has_error() [2/2]

bool rpnx::querygraph::result< void >::has_error ( ) const
inline

Return whether evaluation completed with an error.

Definition at line 768 of file querygraph.hpp.

◆ has_exception() [1/2]

bool rpnx::querygraph::result< void >::has_exception ( ) const
inline

Compatibility spelling for has_error().

Definition at line 642 of file querygraph.hpp.

◆ has_exception() [2/2]

bool rpnx::querygraph::result< void >::has_exception ( ) const
inline

Compatibility spelling for has_error().

Definition at line 774 of file querygraph.hpp.

References rpnx::querygraph::result< T >::has_error().

◆ has_result() [1/2]

bool rpnx::querygraph::result< void >::has_result ( ) const
inline

Return whether evaluation produced either a value or an error.

Definition at line 624 of file querygraph.hpp.

◆ has_result() [2/2]

bool rpnx::querygraph::result< void >::has_result ( ) const
inline

Return whether evaluation produced success or an error.

Definition at line 756 of file querygraph.hpp.

◆ has_unexpected_exception() [1/2]

bool rpnx::querygraph::result< void >::has_unexpected_exception ( ) const
inline

Return whether the result contains an unexpected exception.

Definition at line 654 of file querygraph.hpp.

◆ has_unexpected_exception() [2/2]

bool rpnx::querygraph::result< void >::has_unexpected_exception ( ) const
inline

Return whether the result contains an unexpected exception.

Definition at line 786 of file querygraph.hpp.

◆ has_value() [1/2]

bool rpnx::querygraph::result< void >::has_value ( ) const
inline

Return whether evaluation completed successfully.

Definition at line 630 of file querygraph.hpp.

◆ has_value() [2/2]

bool rpnx::querygraph::result< void >::has_value ( ) const
inline

Return whether evaluation completed successfully.

Definition at line 762 of file querygraph.hpp.

◆ operator bool() [1/2]

rpnx::querygraph::result< void >::operator bool ( ) const
inlineexplicit

Return whether evaluation has reached any terminal state.

Definition at line 682 of file querygraph.hpp.

◆ operator bool() [2/2]

rpnx::querygraph::result< void >::operator bool ( ) const
inlineexplicit

Return whether evaluation has reached any terminal state.

Definition at line 814 of file querygraph.hpp.

References rpnx::querygraph::result< T >::has_result().

◆ result_status() [1/2]

status rpnx::querygraph::result< void >::result_status ( ) const
inline

Return the status used when serializing this result.

Definition at line 672 of file querygraph.hpp.

◆ result_status() [2/2]

status rpnx::querygraph::result< void >::result_status ( ) const
inline

Return the status used when serializing this result.

Definition at line 804 of file querygraph.hpp.

◆ set_error() [1/4]

void rpnx::querygraph::result< void >::set_error ( error_result< void > error)
inline

Replace any prior state with error.

Definition at line 605 of file querygraph.hpp.

◆ set_error() [2/4]

void rpnx::querygraph::result< void >::set_error ( error_result< void > error)
inline

Replace any prior state with error.

Definition at line 737 of file querygraph.hpp.

◆ set_error() [3/4]

void rpnx::querygraph::result< void >::set_error ( std::exception_ptr exception)
inline

Replace any prior state with an unexpected exception.

Definition at line 612 of file querygraph.hpp.

◆ set_error() [4/4]

void rpnx::querygraph::result< void >::set_error ( std::exception_ptr exception)
inline

Replace any prior state with an unexpected exception.

Definition at line 744 of file querygraph.hpp.

References rpnx::querygraph::result< T >::set_error(), and rpnx::querygraph::error_result::unexpected().

◆ set_exception() [1/2]

void rpnx::querygraph::result< void >::set_exception ( std::exception_ptr exception)
inline

Compatibility spelling for set_error(exception).

Definition at line 618 of file querygraph.hpp.

◆ set_exception() [2/2]

void rpnx::querygraph::result< void >::set_exception ( std::exception_ptr exception)
inline

Compatibility spelling for set_error(exception).

Definition at line 750 of file querygraph.hpp.

References rpnx::querygraph::result< T >::set_error().

◆ set_value() [1/2]

void rpnx::querygraph::result< void >::set_value ( )
inline

Replace any prior state with successful completion.

Definition at line 730 of file querygraph.hpp.

◆ set_value() [2/2]

void rpnx::querygraph::result< void >::set_value ( void value)
inline

Replace any prior state with a completed value.

Definition at line 598 of file querygraph.hpp.

◆ test() [1/2]

void rpnx::querygraph::result< void >::test ( ) const
inline

Rethrow the stored error, if one exists.

Definition at line 533 of file querygraph.hpp.

◆ test() [2/2]

void rpnx::querygraph::result< void >::test ( ) const
inline

Rethrow the stored error, if one exists.

Definition at line 705 of file querygraph.hpp.

◆ value() [1/5]

void & rpnx::querygraph::result< void >::value ( ) &
inline

Alias for get() preserving the value category.

Definition at line 574 of file querygraph.hpp.

◆ value() [2/5]

void && rpnx::querygraph::result< void >::value ( ) &&
inline

Alias for get() preserving the value category.

Definition at line 586 of file querygraph.hpp.

◆ value() [3/5]

void rpnx::querygraph::result< void >::value ( ) const
inline

Alias for get().

Definition at line 724 of file querygraph.hpp.

References rpnx::querygraph::result< T >::get().

◆ value() [4/5]

void const & rpnx::querygraph::result< void >::value ( ) const &
inline

Alias for get() preserving the value category.

Definition at line 580 of file querygraph.hpp.

◆ value() [5/5]

void const && rpnx::querygraph::result< void >::value ( ) const &&
inline

Alias for get() preserving the value category.

Definition at line 592 of file querygraph.hpp.


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