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

Public Types | Public Member Functions | List of all members
fsdk::ISerializableObject Struct Referenceabstract
SDK core interfaces

Serializable object interface. More...

`#include <IObject.h>`

Inheritance diagram for fsdk::ISerializableObject:

## Public Types
enum | Error : uint32_t { Error::Ok, Error::Size, Error::Signature, Error::ArchiveRead, Error::InputArchive, Error::ArchiveWrite }
| Serialization nerror codes. More...
enum | Flags { Default = 0, NoSignature = 1 }
| Serialization flags. More...

## Public Member Functions
virtual void | getSize (Sizer &sizer, uint32_t flags=Default) const noexcept=0
| Estimate size of this object binary data. More...
virtual Result< Error > | load (IArchive *archive, uint32_t flags=Default)=0
| Load object from archive. More...
virtual Result< Error > | save (IArchive *archive, uint32_t flags=Default) const =0
| Save object to archive. More...
Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t | retain () noexcept=0
| Increase strong reference count. More...
virtual int32_t | retainLocked () noexcept=0
| Increase strong reference count thread safely. More...
virtual int32_t | release () noexcept=0
| Decrease strong reference count. More...
virtual int32_t | getRefCount () const noexcept=0
| Get actual strong reference count. More...
virtual int32_t | retainWeak () noexcept=0
| Increase weak reference count. More...
virtual int32_t | releaseWeak () noexcept=0
| Decrease weak reference count. More...
virtual int32_t | getWeakRefCount () const noexcept=0
| Get actual weak reference count. More...

## Detailed Description

Serializable object interface.

Provides common functions for all serializable objects.

## Member Enumeration Documentation

## ◆ Error

enum fsdk::ISerializableObject::Error : uint32_t
| strong

Serialization nerror codes.

Enumerator
Ok | Ok.
Size | Not enough space.
Signature | Invalid signature.
ArchiveRead | Error during archive reading,.
InputArchive | Input archive is nullptr.
ArchiveWrite | Error during archive writing,.

## ◆ Flags

enum fsdk::ISerializableObject::Flags

Serialization flags.

These flags control advanced options and should not be set to anything else from Default in normal conditions.

Note
  The same set of flags should be specified for both save() and load().

Enumerator
Default | Default serialization mode.
NoSignature | Omit object signature. Helps to save space if there are several objects of the same type coming in a stream or where type is known for sure. Note This effectively disables signature check on loading. This may cause undefined results in case of mismatched input data.

## Member Function Documentation

## ◆ getSize()

virtual void fsdk::ISerializableObject::getSize | ( | Sizer & | sizer,
|  | uint32_t | flags = `Default`
| ) |  | const
| pure virtual noexcept

Estimate size of this object binary data.

Parameters

  [in,out] | sizer | sizer object to append result to.
  [in] | flags | [optional] serialization flags

See also
  Flags.

## ◆ load()

virtual Result<Error> fsdk::ISerializableObject::load | ( | IArchive * | archive,
|  | uint32_t | flags = `Default`
| ) |  |
| pure virtual

Load object from archive.

Parameters

  [in] | archive | archive to read from.
  [in] | flags | [optional] serialization flags

See also
  Flags.

Returns
  Result with error code specified by ISerializableObject::SerializationError.

Note
  This method pass exceptions from user defined IArchive, but doesnt throw its own

See also
  Result and ISerializableObject::SerializationError.

## ◆ save()

virtual Result<Error> fsdk::ISerializableObject::save | ( | IArchive * | archive,
|  | uint32_t | flags = `Default`
| ) |  | const
| pure virtual

Save object to archive.

Parameters

  [in] | archive | archive to write to.
  [in] | flags | [optional] serialization flags

See also
  Flags.

Returns
  Result with error code specified by ISerializableObject::SerializationError.

Note
  This method pass exceptions from user defined IArchive, but doesnt throw its own

See also
  Result and ISerializableObject::SerializationError.

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

- include/fsdk/IObject.h