open62541pp 0.22.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Public Member Functions | List of all members
opcua::Result< void > Class Reference

#include <result.hpp>

Detailed Description

Template specialization of Result class for void types.

Result<void> contains only a StatusCode.

Definition at line 343 of file result.hpp.

Public Member Functions

constexpr Result () noexcept
 
constexpr Result (StatusCode code) noexcept
 
constexpr Result (const BadResult &error) noexcept
 
constexpr void operator* () const noexcept
 
constexpr StatusCode code () const noexcept
 
constexpr operator bool () const noexcept
 
constexpr bool hasValue () const noexcept
 
constexpr void value () const
 

Constructor & Destructor Documentation

◆ Result() [1/3]

constexpr opcua::Result< void >::Result ( )
inlineconstexprnoexcept

Create a default Result (good StatusCode).

Definition at line 348 of file result.hpp.

◆ Result() [2/3]

constexpr opcua::Result< void >::Result ( StatusCode  code)
inlineconstexprnoexcept

Create a Result with the given StatusCode.

Definition at line 354 of file result.hpp.

◆ Result() [3/3]

constexpr opcua::Result< void >::Result ( const BadResult< void > &  error)
inlineconstexprnoexcept

Create a Result with the given error.

Definition at line 360 of file result.hpp.

Member Function Documentation

◆ code()

constexpr StatusCode opcua::Result< void >::code ( ) const
inlineconstexprnoexcept

Get the code of the Result.

Definition at line 368 of file result.hpp.

◆ hasValue()

constexpr bool opcua::Result< void >::hasValue ( ) const
inlineconstexprnoexcept

Definition at line 382 of file result.hpp.

◆ operator bool()

constexpr opcua::Result< void >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Check if the Result has a non-bad StatusCode.

Definition at line 375 of file result.hpp.

◆ operator*()

constexpr void opcua::Result< void >::operator* ( ) const
inlineconstexprnoexcept

Definition at line 363 of file result.hpp.

◆ value()

constexpr void opcua::Result< void >::value ( ) const
inlineconstexpr

Get the value of the Result.

Exceptions
BadStatusIf the Result does have a bad StatusCode.

Definition at line 390 of file result.hpp.