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

Classes | Public Types | Public Member Functions | Public Attributes | List of all members
fsdk::ISettingsProvider::Value Struct Reference

Configuration parameter value. More...

`#include <ISettingsProvider.h>`

## Classes
union | Data
| Value data. More...

## Public Types
enum | Type { Undefined, Int1, Int2, Int3, Int4, ULong, Float1, Float2, Float3, Float4, String }
| Value type. More...

## Public Member Functions
| Value () noexcept
| Initialize an empty value. More...
| Value (int x) noexcept
| Initialize an integer value. More...
| Value (std::uint64_t x) noexcept
| Initialize an std::uint64_t value. More...
| Value (int x, int y) noexcept
| Initialize a 2d integer value. More...
| Value (int x, int y, int z) noexcept
| Initialize a 3d integer value. More...
| Value (int x, int y, int z, int w) noexcept
| Initialize a 4d integer value. More...
| Value (float x) noexcept
| Initialize a float value. More...
| Value (float x, float y) noexcept
| Initialize a 2d float value. More...
| Value (float x, float y, float z) noexcept
| Initialize a 3d float value. More...
| Value (float x, float y, float z, float w) noexcept
| Initialize a 4d float value. More...
| Value (const char *string) noexcept
| Initialize a string value. More...
| Value (const Rect &rect) noexcept
| Initialize a rect value. More...
| Value (const Size &size) noexcept
| Initialize a size value. More...
| Value (const Point2f &point) noexcept
| Initialize a point value. More...
| Value (bool x) noexcept
| Initialize a bool value. More...
| operator bool () const noexcept
| Check if value type is not `Undefined`. More...
bool | is (Type type) const noexcept
| Check if value type is of concrete type. More...
bool | setString (const char *string) noexcept
| Set a string value. More...
bool | getString (char *string) const noexcept
| Get a string value. More...
void | setRect (const Rect &rect) noexcept
| Set a rect value. More...
bool | getRect (Rect *rect) const noexcept
| Get a rect value. More...
void | setSize (const Size &size) noexcept
| Set a size value. More...
bool | getSize (Size *size) const noexcept
| Get a size value. More...
void | setPoint2i (const Point2i &point) noexcept
| Set a Point2i value. More...
bool | getPoint2i (Point2i *point) const noexcept
| Get a Point2i value. More...
void | setPoint2f (const Point2f &point) noexcept
| Set a setPoint2f value. More...
bool | getPoint2f (Point2f *point) const noexcept
| Get a Point2f value. More...
void | setBool (bool x) noexcept
| Set a bool value. More...
bool | getBool (bool *x) const noexcept
| Get a bool value. More...
void | setInt (int x) noexcept
| Set an int value. More...
bool | getInt (int *x) const noexcept
| Get an int value. More...
void | setULong (std::uint64_t x) noexcept
| Set an std::uint64_t value. More...
bool | getULong (std::uint64_t *x) const noexcept
| Get an std::uint64_t value. More...
void | setInt (int x, int y) noexcept
| Set a 2d int value. More...
bool | getInt (int *x, int *y) const noexcept
| Get a 2d int value. More...
void | setInt (int x, int y, int z) noexcept
| Set a 3d int value. More...
bool | getInt (int *x, int *y, int *z) const noexcept
| Get a 3d int value. More...
void | setInt (int x, int y, int z, int w) noexcept
| Set a 4d int value. More...
bool | getInt (int *x, int *y, int *z, int *w) const noexcept
| Get a 4d int value. More...
void | setFloat (float x) noexcept
| Set a float value. More...
bool | getFloat (float *x) const noexcept
| Get a float value. More...
void | setFloat (float x, float y) noexcept
| Set a 2d float value. More...
bool | getFloat (float *x, float *y) const noexcept
| Get a 2d float value. More...
void | setFloat (float x, float y, float z) noexcept
| Set a 3d float value. More...
bool | getFloat (float *x, float *y, float *z) const noexcept
| Get a 3d float value. More...
void | setFloat (float x, float y, float z, float w) noexcept
| Set a 4d float value. More...
bool | getFloat (float *x, float *y, float *z, float *w) const noexcept
| Get a 4d float value. More...
float | asFloat (float defaultValue=0.f) const noexcept
| Safely get a float. More...
Point2f | asPoint2f (const Point2f &defaultValue=Point2f()) const noexcept
| Safely get a Point2f. More...
bool | asBool (bool defaultValue=false) const noexcept
| Safely get a boolean. More...
int | asInt (int defaultValue=0) const noexcept
| Safely get an integer. More...
std::uint64_t | asULong (std::uint64_t defaultValue=0) const noexcept
| Safely get an std::uint64_t. More...
Size | asSize (const Size &defaultValue=Size()) const noexcept
| Safely get a Size. More...
Point2i | asPoint2i (const Point2i &defaultValue=Point2i()) const noexcept
| Safely get a Point2i. More...
Rect | asRect (const Rect &defaultValue=Rect()) const noexcept
| Safely get a Rect. More...
const char * | asString (const char *defaultValue="") const noexcept
| Safely get a string. More...
| Value (const Value &other)=delete
| Value (Value &&other)
Value & | operator= (const Value &other)=delete
Value & | operator= (Value &&other)
void | swap (Value &first, Value &second)

## Public Attributes
union fsdk::ISettingsProvider::Value::Data | m_data
| Data storage.
enum fsdk::ISettingsProvider::Value::Type | m_type
| Data type..

## Detailed Description

Configuration parameter value.

## Member Enumeration Documentation

## ◆ Type

enum fsdk::ISettingsProvider::Value::Type

Value type.

Enumerator
Undefined | Unkown value type.
Int1 | Integer.
Int2 | 2D integer.
Int3 | 3D integer.
Int4 | 4D integer.
ULong | std::uint64_t.
Float1 | floating point.
Float2 | 2D floating point.
Float3 | 3D floating point.
Float4 | 4D floating point.
String | Short string.

## Constructor & Destructor Documentation

## ◆ Value() [1/15]

fsdk::ISettingsProvider::Value::Value | ( |  | ) |
| noexcept

Initialize an empty value.

Value type will be set to `Undefined`.

## ◆ Value() [2/15]

fsdk::ISettingsProvider::Value::Value | ( | int | x | ) |
| noexcept

Initialize an integer value.

Parameters

  x | integer value.

## ◆ Value() [3/15]

fsdk::ISettingsProvider::Value::Value | ( | std::uint64_t | x | ) |
| noexcept

Initialize an std::uint64_t value.

Parameters

  x | std::uint64_t value.

## ◆ Value() [4/15]

fsdk::ISettingsProvider::Value::Value | ( | int | x,
|  | int | y
| ) |  |
| noexcept

Initialize a 2d integer value.

Parameters

  x | 1st value.
  y | 2nd value.

## ◆ Value() [5/15]

fsdk::ISettingsProvider::Value::Value | ( | int | x,
|  | int | y,
|  | int | z
| ) |  |
| noexcept

Initialize a 3d integer value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.

## ◆ Value() [6/15]

fsdk::ISettingsProvider::Value::Value | ( | int | x,
|  | int | y,
|  | int | z,
|  | int | w
| ) |  |
| noexcept

Initialize a 4d integer value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.
  w | 4th value.

## ◆ Value() [7/15]

fsdk::ISettingsProvider::Value::Value | ( | float | x | ) |
| noexcept

Initialize a float value.

Parameters

  x | float value.

## ◆ Value() [8/15]

fsdk::ISettingsProvider::Value::Value | ( | float | x,
|  | float | y
| ) |  |
| noexcept

Initialize a 2d float value.

Parameters

  x | 1st value.
  y | 2nd value.

## ◆ Value() [9/15]

fsdk::ISettingsProvider::Value::Value | ( | float | x,
|  | float | y,
|  | float | z
| ) |  |
| noexcept

Initialize a 3d float value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.

## ◆ Value() [10/15]

fsdk::ISettingsProvider::Value::Value | ( | float | x,
|  | float | y,
|  | float | z,
|  | float | w
| ) |  |
| noexcept

Initialize a 4d float value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.
  w | 4th value.

## ◆ Value() [11/15]

fsdk::ISettingsProvider::Value::Value | ( | const char * | string | ) |
| noexcept

Initialize a string value.

Note
  Only short strings (<64 chars) are supported.

Parameters

  string | string value.

## ◆ Value() [12/15]

fsdk::ISettingsProvider::Value::Value | ( | const Rect & | rect | ) |
| noexcept

Initialize a rect value.

Parameters

  rect | rect value.

## ◆ Value() [13/15]

fsdk::ISettingsProvider::Value::Value | ( | const Size & | size | ) |
| noexcept

Initialize a size value.

Parameters

  size | size value.

## ◆ Value() [14/15]

fsdk::ISettingsProvider::Value::Value | ( | const Point2f & | point | ) |
| noexcept

Initialize a point value.

Parameters

  point | point value.

## ◆ Value() [15/15]

fsdk::ISettingsProvider::Value::Value | ( | bool | x | ) |
| noexcept

Initialize a bool value.

Parameters

  x | bool value.

## Member Function Documentation

## ◆ asBool()

bool fsdk::ISettingsProvider::Value::asBool | ( | bool | defaultValue = `false` | ) | const
| noexcept

Safely get a boolean.

If actual value type is convertible to bool, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asFloat()

float fsdk::ISettingsProvider::Value::asFloat | ( | float | defaultValue = `0.f` | ) | const
| noexcept

Safely get a float.

If actual value type is float, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asInt()

int fsdk::ISettingsProvider::Value::asInt | ( | int | defaultValue = `0` | ) | const
| noexcept

Safely get an integer.

If actual value type is Int, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asPoint2f()

Point2f fsdk::ISettingsProvider::Value::asPoint2f | ( | const Point2f & | defaultValue = `Point2f()` | ) | const
| noexcept

Safely get a Point2f.

If actual value type is convertible to Point2f, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asPoint2i()

Point2i fsdk::ISettingsProvider::Value::asPoint2i | ( | const Point2i & | defaultValue = `Point2i()` | ) | const
| noexcept

Safely get a Point2i.

If actual value type is convertible to Point2i, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asRect()

Rect fsdk::ISettingsProvider::Value::asRect | ( | const Rect & | defaultValue = `Rect()` | ) | const
| noexcept

Safely get a Rect.

If actual value type is convertible to Rect, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asSize()

Size fsdk::ISettingsProvider::Value::asSize | ( | const Size & | defaultValue = `Size()` | ) | const
| noexcept

Safely get a Size.

If actual value type is convertible to Size, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asString()

const char* fsdk::ISettingsProvider::Value::asString | ( | const char * | defaultValue = `""` | ) | const
| noexcept

Safely get a string.

If actual value type is String, the value is returned; if not a fallback value is returned.

Note
  Doesn't allocate or copy memory.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ asULong()

std::uint64_t fsdk::ISettingsProvider::Value::asULong | ( | std::uint64_t | defaultValue = `0` | ) | const
| noexcept

Safely get an std::uint64_t.

If actual value type is ULong, the value is returned; if not a fallback value is returned.

Parameters

  defaultValue | fallback value (optional).

Returns
  value.

## ◆ getBool()

bool fsdk::ISettingsProvider::Value::getBool | ( | bool * | x | ) | const
| noexcept

Get a bool value.

Parameters

  [out] | x | the value.

Note
  function fails if actual value type is not convertible to bool; in this case `x` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getFloat() [1/4]

bool fsdk::ISettingsProvider::Value::getFloat | ( | float * | x | ) | const
| noexcept

Get a float value.

Parameters

  [out] | x | the value.

Note
  function fails if actual value type is not a float; in this case 'x' isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getFloat() [2/4]

bool fsdk::ISettingsProvider::Value::getFloat | ( | float * | x,
|  | float * | y
| ) |  | const
| noexcept

Get a 2d float value.

Parameters

  [out] | x | 1st value.
  [out] | y | 2nd value.

Note
  function fails if actual value type is not a 2d float; in this case output parameters aren't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getFloat() [3/4]

bool fsdk::ISettingsProvider::Value::getFloat | ( | float * | x,
|  | float * | y,
|  | float * | z
| ) |  | const
| noexcept

Get a 3d float value.

Parameters

  [out] | x | 1st value.
  [out] | y | 2nd value.
  [out] | z | 3rd value.

Note
  function fails if actual value type is not a 3d float; in this case output parameters aren't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getFloat() [4/4]

bool fsdk::ISettingsProvider::Value::getFloat | ( | float * | x,
|  | float * | y,
|  | float * | z,
|  | float * | w
| ) |  | const
| noexcept

Get a 4d float value.

Parameters

  [out] | x | 1st value.
  [out] | y | 2nd value.
  [out] | z | 3rd value.
  [out] | w | 4th value.

Note
  function fails if actual value type is not a 4d float; in this case output parameters aren't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getInt() [1/4]

bool fsdk::ISettingsProvider::Value::getInt | ( | int * | x | ) | const
| noexcept

Get an int value.

Parameters

  [out] | x | the value.

Note
  function fails if actual value type is not an int; in this case `x` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getInt() [2/4]

bool fsdk::ISettingsProvider::Value::getInt | ( | int * | x,
|  | int * | y
| ) |  | const
| noexcept

Get a 2d int value.

Parameters

  [out] | x | 1st value.
  [out] | y | 2nd value.

Note
  function fails if actual value type is not a 2d int; in this case output parameters aren't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getInt() [3/4]

bool fsdk::ISettingsProvider::Value::getInt | ( | int * | x,
|  | int * | y,
|  | int * | z
| ) |  | const
| noexcept

Get a 3d int value.

Parameters

  [out] | x | 1st value.
  [out] | y | 2nd value.
  [out] | z | 3rd value.

Note
  function fails if actual value type is not a 3d int; in this case output parameters aren't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getInt() [4/4]

bool fsdk::ISettingsProvider::Value::getInt | ( | int * | x,
|  | int * | y,
|  | int * | z,
|  | int * | w
| ) |  | const
| noexcept

Get a 4d int value.

Parameters

  [out] | x | 1st value.
  [out] | y | 2nd value.
  [out] | z | 3rd value.
  [out] | w | 4th value.

Note
  function fails if actual value type is not a 4d int; in this case output parameters aren't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getPoint2f()

bool fsdk::ISettingsProvider::Value::getPoint2f | ( | Point2f * | point | ) | const
| noexcept

Get a Point2f value.

Parameters

  [out] | point | the value.

Note
  function fails if actual value type is not convertible to Point2f; in this case `point` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getPoint2i()

bool fsdk::ISettingsProvider::Value::getPoint2i | ( | Point2i * | point | ) | const
| noexcept

Get a Point2i value.

Parameters

  [out] | point | the value.

Note
  function fails if actual value type is not convertible to Point2i; in this case `point` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getRect()

bool fsdk::ISettingsProvider::Value::getRect | ( | Rect * | rect | ) | const
| noexcept

Get a rect value.

Parameters

  [out] | rect | the value.

Note
  function fails if actual value type is not convertible to rect; in this case `rect` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getSize()

bool fsdk::ISettingsProvider::Value::getSize | ( | Size * | size | ) | const
| noexcept

Get a size value.

Parameters

  [out] | size | the value.

Note
  function fails if actual value type is not convertible to size; in this case `size` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getString()

bool fsdk::ISettingsProvider::Value::getString | ( | char * | string | ) | const
| noexcept

Get a string value.

Parameters

  [out] | string | the value.

Note
  function fails if actual value type is not string; in this case `string` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ getULong()

bool fsdk::ISettingsProvider::Value::getULong | ( | std::uint64_t * | x | ) | const
| noexcept

Get an std::uint64_t value.

Parameters

  [out] | x | the value.

Note
  function fails if actual value type is not an std::uint64_t; in this case `x` isn't modified.

Returns
  true if succeeded; false otherwise.

## ◆ is()

bool fsdk::ISettingsProvider::Value::is | ( | Type | type | ) | const
| noexcept

Check if value type is of concrete type.

Parameters

  type | type to check.

Returns
  true if value type is equal to `type`.

## ◆ operator bool()

fsdk::ISettingsProvider::Value::operator bool | ( |  | ) | const
| noexcept

Check if value type is not `Undefined`.

Returns
  true if value type is not `Undefined`.

## ◆ setBool()

void fsdk::ISettingsProvider::Value::setBool | ( | bool | x | ) |
| noexcept

Set a bool value.

Parameters

  x | the value.

## ◆ setFloat() [1/4]

void fsdk::ISettingsProvider::Value::setFloat | ( | float | x | ) |
| noexcept

Set a float value.

Parameters

  x | the value.

## ◆ setFloat() [2/4]

void fsdk::ISettingsProvider::Value::setFloat | ( | float | x,
|  | float | y
| ) |  |
| noexcept

Set a 2d float value.

Parameters

  x | 1st value.
  y | 2nd value.

## ◆ setFloat() [3/4]

void fsdk::ISettingsProvider::Value::setFloat | ( | float | x,
|  | float | y,
|  | float | z
| ) |  |
| noexcept

Set a 3d float value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.

## ◆ setFloat() [4/4]

void fsdk::ISettingsProvider::Value::setFloat | ( | float | x,
|  | float | y,
|  | float | z,
|  | float | w
| ) |  |
| noexcept

Set a 4d float value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.
  w | 4th value.

## ◆ setInt() [1/4]

void fsdk::ISettingsProvider::Value::setInt | ( | int | x | ) |
| noexcept

Set an int value.

Parameters

  x | the value.

## ◆ setInt() [2/4]

void fsdk::ISettingsProvider::Value::setInt | ( | int | x,
|  | int | y
| ) |  |
| noexcept

Set a 2d int value.

Parameters

  x | 1st value.
  y | 2nd value.

## ◆ setInt() [3/4]

void fsdk::ISettingsProvider::Value::setInt | ( | int | x,
|  | int | y,
|  | int | z
| ) |  |
| noexcept

Set a 3d int value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.

## ◆ setInt() [4/4]

void fsdk::ISettingsProvider::Value::setInt | ( | int | x,
|  | int | y,
|  | int | z,
|  | int | w
| ) |  |
| noexcept

Set a 4d int value.

Parameters

  x | 1st value.
  y | 2nd value.
  z | 3rd value.
  w | 4th value.

## ◆ setPoint2f()

void fsdk::ISettingsProvider::Value::setPoint2f | ( | const Point2f & | point | ) |
| noexcept

Set a setPoint2f value.

Parameters

  point | the value.

## ◆ setPoint2i()

void fsdk::ISettingsProvider::Value::setPoint2i | ( | const Point2i & | point | ) |
| noexcept

Set a Point2i value.

Parameters

  point | the value.

## ◆ setRect()

void fsdk::ISettingsProvider::Value::setRect | ( | const Rect & | rect | ) |
| noexcept

Set a rect value.

Parameters

  rect | the value.

## ◆ setSize()

void fsdk::ISettingsProvider::Value::setSize | ( | const Size & | size | ) |
| noexcept

Set a size value.

Parameters

  size | the value.

## ◆ setString()

bool fsdk::ISettingsProvider::Value::setString | ( | const char * | string | ) |
| noexcept

Set a string value.

Parameters

  string | the value.

## ◆ setULong()

void fsdk::ISettingsProvider::Value::setULong | ( | std::uint64_t | x | ) |
| noexcept

Set an std::uint64_t value.

Parameters

  x | the std::uint64_t value.

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

- include/fsdk/ISettingsProvider.h