Global Settings#
The following settings are used to configure the global settings of the application. Generally, you’d better to configure them when you start the application and do not change them during the running time, although some of them can be changed at any time.
Product Information#
-
struct ProductInfo#
AIDI-SDK production infomation.
This class is used to describe the production infomation of AIDI-SDK. include the version, build date, and so on.
Public Members
-
int version_major#
The major version, such as 1.
-
int version_minor#
The minor version, such as 2.
-
int version_patch#
The patch version, such as 35.
-
uint64_t version_num#
The version number, equal to (version_major * 1000000 + version_minor * 1000 + version_patch). e.g. 1.2.35 is 001002035.
-
std::string version#
The version string, such as “1.2.35”.
-
std::string version_full#
The full version string with revision, e.g. “1.2.35.beta.a0f8b8b.0”.
-
std::string file_hash#
The file hash, e.g. “a0f8b8b.0”.
-
std::string file_full_hash#
The full file hash.
-
std::string release_tag#
The release tag, oneof “alpha”, “beta”, “preview”, “release”.
-
int64_t build_timestamp#
The build timestamp, e.g. 1514098983.
-
std::string copyright#
The copyright, e.g. “Copyright (c) 2017-present, Aqrose Technology,
Ltd. All rights reserved.”.
Public Static Functions
-
static const ProductInfo &Get()#
Get the release version information of AIDI-SDK. With this function, you can get the release version information at runtime.
- Returns:
the version information.
-
int version_major#
Locale and Encoding Settings#
-
struct LocaleOptions#
AIDI-SDK’s locale options, see init_locale for more usage.
Public Members
-
const char *language = ""#
Language used in AIDI-SDK. Currently, there are two language you can choose : Chinese (zh_CN) or English (en_US). By default, AIDI-SDK will use the language consistent with the operating system settings if you don’t set any language or set an empty string.
-
const char *mo_dir = ""#
AIDI-SDK’s binary message (the mo file) catalog. By default, AIDI-SDK will look for binary message catalog in “language” directory under the binary library directory. If you do not use default path, You must give a directory that complies with the gettext’s binary message catalog specification. for example, if you set mo_dir to
, there must exist files such like"C:/language"
or"C:/language/en_US/LC_MESSAGES/aidi-sdk.mo"
."C:/language/zh_CN/LC_MESSAGES/aidi-sdk.mo"
-
const char *encoding = "UTF-8"#
AIDI-SDK only support utf-8 codeing, do not change this option.
-
const char *domain = "aidi-sdk"#
Binary message file (mo file) name, use “aidi-sdk” by default. Do not change this option if you do not know what you are doing.
-
const char *language = ""#
-
void aidi::init_locale(const LocaleOptions &options)#
Set AIDI-SDK’s locale options.
- Parameters:
options – locale options about language, encoding, binary message catalog. see LocaleOptions for more details.
Logging Settings#
-
using LogSinkFunc = void (*)(int, const char*, size_t)#
Log sink interface. with this interface, you can implement your own log sink to recieve log messages.
-
struct LoggerOptions#
AIDI-SDK Logger Options.
Public Members
-
const char *file_sink = nullptr#
Log file path; after setting this option, AIDI-SDK will write the log to the file; if the file does not exist, AIDI will try to create it automatically; if the file already exists , The log information will be appended to the file; the default path is empty, which means that the log will not be output to any file.
-
LogSinkFunc func_sink = nullptr#
Pass in the function pointer used to receive the log, and output the log to your custom function.
-
bool stdout_sink = true#
print the log to the standard output device, this option is enabled by default.
-
bool msvc_sink = false#
When debugging on the Windows platform, you can enable this option to print the log to the debug output window of Visual Studio.
-
const char *file_sink = nullptr#
-
void aidi::init_logger(const LoggerOptions &options)#