stub_analytics_plugin
1.6
Network Optix Video Analytics SDK
|
#include <utils.h>
Public Member Functions | |
Utils (bool enableOutput, const std::string &printPrefix) | |
bool | fillAndOutputSettingsMap (std::map< std::string, std::string > *map, const nx::sdk::Settings *settings, const std::string &caption, int outputIndent=0) const |
Public Attributes | |
const bool | enableOutput |
const std::string | printPrefix |
Plugin utils providing convenience for using NX_PRINT/NX_OUTPUT with their settings (printPrefix string and enableOutput flag) taken from the particular plugin: these settings are stored in this class.
To use this tool in a class, make a field "const nx::sdk::Utils utils", and add the lines:
#define NX_PRINT_PREFIX (this->utils.printPrefix)
#define NX_DEBUG_ENABLE_OUTPUT (this->utils.enableOutput)
#include <nx/kit/debug.h>
bool nx::sdk::Utils::fillAndOutputSettingsMap | ( | std::map< std::string, std::string > * | map, |
const nx::sdk::Settings * | settings, | ||
const std::string & | caption, | ||
int | outputIndent = 0 |
||
) | const |
Convert the settings to a map and log via NX_OUTPUT. Errors are printed with NX_PRINT.
caption | To be printed before the settings and errors; will be followed by ":". |
outputIndent | Number of spaces to be printed before each line printed with NX_OUTPUT. |