nx_video_source_sdk
1.0
Video Source SDK
|
#include <stdbool.h>
Go to the source code of this file.
Enumerations | |
enum | NxIniOutput { NX_INI_OUTPUT_NONE, NX_INI_OUTPUT_STDOUT, NX_INI_OUTPUT_STDERR } |
Variables | |
struct Ini | NX_INI_STRUCT |
NX_KIT_C_API struct Ini | ini |
C99 wrapper for C++ module "ini_config". Only one .ini instance is supported. Can be included in both C++ and C99 source files.
If compiled into a library, define -DNX_KIT_C_API as needed for import/export directives.
In your C99 program, use .ini file as follows:
#include "ini.h"
...
int main()
{
nx_ini_reload();
...
if (ini.myFlag)
...
}
In your C99 project, add nx/kit/ini_config.cpp and the following files:
#pragma once
#define NX_INI_FILE "my_module.ini"
#define NX_INI_STRUCT \
{ \
NX_INI_FLAG(0, myFlag, "Description"); \
NX_INI_INT(7, myInt, "Description"); \
NX_INI_STRING("default value", myStr, "Description"); \
}
#include <ini_config_c.h>
ini.cpp:
#include "ini.h"
#include <ini_config_c_impl.h>