|
Octane API Client
|
Wrapper class that bifurcates the values indicated by normal and quasi-normal states. More...
#include <result.h>
Public Member Functions | |
| Result (const Result &result) | |
| Result (Result &&result) | |
| ~Result () | |
| Result & | operator= (const Result &result) & |
| Result & | operator= (Result &&result) & |
| operator bool () const noexcept | |
| Judges whether the state is normal. More... | |
| bool | operator! () const noexcept |
| Judges whether the state is quasi-normal. More... | |
| const T_OK & | get () const |
| Get the value of normal state as a constant. More... | |
| T_OK & | get () |
| Get the value of normal state. More... | |
| const T_Error & | err () const |
| Get the value of quasi-normal state as a constant. More... | |
| T_Error & | err () |
| Get the value of quasi-normal state. More... | |
Friends | |
| template<typename T > | |
| class | ok_t |
| template<typename T > | |
| class | error_t |
Wrapper class that bifurcates the values indicated by normal and quasi-normal states.
このクラスはRustに触発されてこしらえました。 実装雑なので与える型によってはコンパイル通らない可能性あり。 This class was inspired by Rust. The implementation is crude, so it may not compile depending on the type you give it.
| T_OK | Type on success. |
| T_Error | Type on error. |
|
inline |

|
inline |

|
inline |

|
inline |
Get the value of quasi-normal state.
このメソッドは事前に準正常系であることを確認してから呼び出さなければならない。 This method must be called after checking that the state is quasi-normal.

|
inline |
Get the value of quasi-normal state as a constant.
このメソッドは事前に準正常系であることを確認してから呼び出さなければならない。 This method must be called after checking that the state is quasi-normal.

|
inline |
Get the value of normal state.
このメソッドは必ず事前に正常系であることを確認してから呼び出さなければならない。 This method must be called after checking that the state is normal.

|
inline |
Get the value of normal state as a constant.
このメソッドは必ず事前に正常系であることを確認してから呼び出さなければならない。 This method must be called after checking that the state is normal.

|
inlinenoexcept |
Judges whether the state is normal.
|
inlinenoexcept |
Judges whether the state is quasi-normal.
|
inline |
|
inline |
| T_Error octane::Result< T_OK, T_Error >::error |
| T_OK octane::Result< T_OK, T_Error >::ok |