Face Engine SDK  4.6.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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.
 
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...
 
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
enumerationto wrap.

Constructor & Destructor Documentation

template<typename E>
fsdk::Result< E >::Result ( error)
inlineexplicitnoexcept

Initializes result.

Parameters
[in]resultvalue to set.

Member Function Documentation

template<typename E>
E fsdk::Result< E >::getError ( ) const
inlinenoexcept

Gets actual result value.

Returns
actual result value.
template<typename E>
bool fsdk::Result< E >::isError ( ) const
inlinenoexcept

Checks for an error.

Returns
true if result represents an error.
template<typename E>
bool fsdk::Result< E >::isOk ( ) const
inlinenoexcept

Checks for a success.

Returns
true if result represents a success.
template<typename E>
fsdk::Result< E >::operator bool ( ) const
inlinenoexcept

Checks for a success.

Returns
true if result represents a success.
template<typename E>
const char* fsdk::Result< E >::what ( ) const
inlinenoexcept

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: