| Face Engine SDK 5.34.0 A face detection, recognition and tracking engine.

Public Types | Public Member Functions | List of all members
fsdk::Result< E > Struct Template Reference

A structure that encapsulates an action result enumeration. More...

`#include <Result.h>`

## Public Types
using | ErrorType = E
| Result value enumeration type.
using | Traits = ErrorTraits< E >

## Public Member Functions
| Result (E error) noexcept
| Initializes result. More...
| Result () noexcept
| Initializes result by default.
E | getError () const noexcept
| Gets actual result value. More...
bool | isError () const noexcept
| Checks for an error. More...
bool | isOk () const noexcept
| Checks for a success. More...
| operator bool () const noexcept
| Checks for a success. More...
| operator int () const noexcept=delete
| Values of type bool participate in integral promotions. A prvalue of type bool can be converted to a prvalue of type int, with false becoming zero and true becoming one. This overload prevents the bool() operator above from participating in dangerous implicit conversion chains such as bool->int, bool->int->float, bool->int->double.
const char * | what () const noexcept
| Gets a textual description of the result. More...

## Detailed Description

### template<typename E>
struct fsdk::Result< E >

A structure that encapsulates an action result enumeration.

An enum should specify a result code. By default the result is in a special uninitialized state which should be interpreted as an error. Default success value shoud be defined to zero.

Template Parameters

  enumeration | to wrap.

## Constructor & Destructor Documentation

## ◆ Result()

template<typename E>

fsdk::Result< E >::Result | ( | E | error | ) |
| inline explicit noexcept

Initializes result.

Parameters

  [in] | result | value to set.

## Member Function Documentation

## ◆ getError()

template<typename E>

E fsdk::Result< E >::getError | ( |  | ) | const
| inline noexcept

Gets actual result value.

Returns
  actual result value.

## ◆ isError()

template<typename E>

bool fsdk::Result< E >::isError | ( |  | ) | const
| inline noexcept

Checks for an error.

Returns
  true if result represents an error.

## ◆ isOk()

template<typename E>

bool fsdk::Result< E >::isOk | ( |  | ) | const
| inline noexcept

Checks for a success.

Returns
  true if result represents a success.

## ◆ operator bool()

template<typename E>

fsdk::Result< E >::operator bool | ( |  | ) | const
| inline noexcept

Checks for a success.

Returns
  true if result represents a success.

## ◆ what()

template<typename E>

const char* fsdk::Result< E >::what | ( |  | ) | const
| inline noexcept

Gets a textual description of the result.

Note
  function toString() should be specialized for this template type T.

Returns
  description string.

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

- include/fsdk/Types/Result.h