Face Engine SDK
5.25.0
A face detection, recognition and tracking engine.
|
SDK settings provider interface. More...
#include <ISettingsProvider.h>
Classes | |
struct | Desc |
Configuration parameter description. More... | |
struct | Entry |
Configuration parameter entry. More... | |
struct | Key |
Configuration parameter key. More... | |
struct | Value |
Configuration parameter value. More... | |
Public Types | |
enum | Error { Ok, IOError, Memory, Internal, InvalidPi, InvalidTag, InvalidCdata, FileNotFound, InvalidPcdata, InvalidDocType, InvalidSettings, InvalidComment, InvalidAttribute, InvalidEndElement, AppendInvalidRoot, NoDocumentElement, EndElementMismatch, InvalidStartElement, MemoryAllocationFailed } |
Config parsing error codes. More... | |
Public Member Functions | |
virtual const char * | getDefaultPath () const noexcept=0 |
Get settings path this provider is bound to. | |
virtual void | setDefaultPath (const char *path) noexcept=0 |
Sets default path for saving of settings provider. | |
virtual Result< Error > | load (const char *path) noexcept=0 |
Load settings from given path. | |
virtual Result< Error > | loadFromString (const char *content) noexcept=0 |
Load settings from given xml-formatted string. | |
virtual bool | save (const char *path) const noexcept=0 |
Save settings values using the default path. | |
virtual void | clear () noexcept=0 |
Clear settings. | |
virtual bool | isEmpty () const noexcept=0 |
virtual void | setDesc (const Key &key, const Desc &desc) noexcept=0 |
Set parameter description. | |
void | setDesc (const char *section, const char *parameter, const Desc &desc) noexcept |
Set parameter description. | |
virtual void | setValue (const Key &key, Value &&value) noexcept=0 |
Set parameter value. | |
void | setValue (const char *section, const char *parameter, Value &&value) noexcept |
Set parameter value. | |
virtual void | setEntry (const Key &key, Entry &&entry) noexcept=0 |
Set parameter. | |
void | setEntry (const Key &key, const Desc &desc, Value &&value) noexcept |
Set parameter. | |
void | setEntry (const char *section, const char *parameter, const Desc &desc, Value &&value) noexcept |
Set parameter. | |
virtual const Entry & | getEntry (const Key &key) const noexcept=0 |
Find parameter entry. | |
Desc | getDesc (const Key &key) const noexcept |
Get parameter description. | |
Desc | getDesc (const char *section, const char *parameter) const noexcept |
Get parameter description. | |
const Value & | getValue (const Key &key) const noexcept |
Get parameter value. | |
const Value & | getValue (const char *section, const char *parameter) const noexcept |
Get parameter value. |
SDK settings provider interface.
Takes care of loading and parsing of SDK configuration files.
Config parsing error codes.
virtual void fsdk::ISettingsProvider::clear | ( | ) | [pure virtual] |
Clear settings.
virtual const char* fsdk::ISettingsProvider::getDefaultPath | ( | ) | const [pure virtual] |
Get settings path this provider is bound to.
This is the same path that was given to load().
Desc fsdk::ISettingsProvider::getDesc | ( | const Key & | key | ) | const |
Get parameter description.
Lookup parameter by key. Return empty description if the parameters does not exist.
key | parameter key. |
Desc fsdk::ISettingsProvider::getDesc | ( | const char * | section, |
const char * | parameter | ||
) | const |
Get parameter description.
Lookup parameter by key. Return empty description if the parameters does not exist.
section | parameter section. |
parameter | parameter name. |
virtual const Entry& fsdk::ISettingsProvider::getEntry | ( | const Key & | key | ) | const [pure virtual] |
Find parameter entry.
Lookup parameter by key. Return empty entry if the parameters does not exist.
key | parameter key. |
const Value& fsdk::ISettingsProvider::getValue | ( | const Key & | key | ) | const |
Get parameter value.
Lookup parameter by key. Return empty value if the parameters does not exist.
key | parameter key. |
const Value& fsdk::ISettingsProvider::getValue | ( | const char * | section, |
const char * | parameter | ||
) | const |
Get parameter value.
Lookup parameter by key. Return empty value if the parameters does not exist.
section | parameter section. |
parameter | parameter name. |
virtual bool fsdk::ISettingsProvider::isEmpty | ( | ) | const [pure virtual] |
Check if there are loaded settings.
virtual Result<Error> fsdk::ISettingsProvider::load | ( | const char * | path | ) | [pure virtual] |
virtual Result<Error> fsdk::ISettingsProvider::loadFromString | ( | const char * | content | ) | [pure virtual] |
virtual bool fsdk::ISettingsProvider::save | ( | const char * | path | ) | const [pure virtual] |
Save settings values using the default path.
path may be null, in this case a path from getDefaultPath() will be used.
virtual void fsdk::ISettingsProvider::setDefaultPath | ( | const char * | path | ) | [pure virtual] |
Sets default path for saving of settings provider.
path | default path |
virtual void fsdk::ISettingsProvider::setDesc | ( | const Key & | key, |
const Desc & | desc | ||
) | [pure virtual] |
Set parameter description.
Lookup parameter by key. Creates a parameter if it does not already exist.
key | parameter key. |
desc | parameter description. |
void fsdk::ISettingsProvider::setDesc | ( | const char * | section, |
const char * | parameter, | ||
const Desc & | desc | ||
) |
Set parameter description.
Lookup parameter by key. Creates a parameter if it does not already exist.
section | parameter section. |
parameter | parameter name. |
desc | parameter description. |
virtual void fsdk::ISettingsProvider::setEntry | ( | const Key & | key, |
Entry && | entry | ||
) | [pure virtual] |
Set parameter.
Lookup parameter by key. Creates a parameter if it does not already exist.
key | parameter key. |
entry | parameter entry. |
void fsdk::ISettingsProvider::setEntry | ( | const Key & | key, |
const Desc & | desc, | ||
Value && | value | ||
) |
Set parameter.
Lookup parameter by key. Creates a parameter if it does not already exist.
key | parameter key. |
desc | parameter description. |
value | parameter value. |
void fsdk::ISettingsProvider::setEntry | ( | const char * | section, |
const char * | parameter, | ||
const Desc & | desc, | ||
Value && | value | ||
) |
Set parameter.
Lookup parameter by key. Creates a parameter if it does not already exist.
section | parameter section. |
parameter | parameter name. |
desc | parameter description. |
value | parameter value. |
virtual void fsdk::ISettingsProvider::setValue | ( | const Key & | key, |
Value && | value | ||
) | [pure virtual] |
Set parameter value.
Lookup parameter by key. Creates a parameter if it does not already exist.
key | parameter key. |
value | parameter value. |
void fsdk::ISettingsProvider::setValue | ( | const char * | section, |
const char * | parameter, | ||
Value && | value | ||
) |
Set parameter value.
Lookup parameter by key. Creates a parameter if it does not already exist.
section | parameter section. |
parameter | parameter name. |
value | parameter value. |