stub_analytics_plugin  1.6
Network Optix Video Analytics SDK
Public Member Functions | Public Attributes | List of all members
nx::sdk::Utils Struct Reference

#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
 

Detailed Description

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>

Member Function Documentation

◆ fillAndOutputSettingsMap()

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.

Parameters
captionTo be printed before the settings and errors; will be followed by ":".
outputIndentNumber of spaces to be printed before each line printed with NX_OUTPUT.
Returns
Whether the settings are valid.

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