Kanzi 4.0.0-beta2
application_properties_loading.hpp File Reference

Classes

struct  kanzi::ColorSpaceTranslator
 Translates from string to meaningful surface color space string. More...
 
struct  kanzi::EGLContextClientVersionTranslator
 Translates from string to meaningful EGL Context client version string. More...
 
struct  kanzi::EGLIMGContextPriorityTranslator
 
struct  kanzi::EGLSurfaceTypeTranslator
 Translates from string to meaningful EGL surface type string. More...
 
struct  kanzi::FontEngineTranslator
 Translates font engine backend from string to ApplicationProperties::FontEngine enum value. More...
 
struct  kanzi::GraphicsContextAPITranslator
 Translates graphics context API property from string to GraphicsContextAPI. More...
 
struct  kanzi::HandleGPUResourcesTranslator
 Converts string to handle GPU resources setting. More...
 
struct  kanzi::InputTranslationTranslator
 Translates input translation property from string to InputTranslation. More...
 
struct  kanzi::Matrix3x3Translator
 Translates from string to matrix 3x3. More...
 
struct  kanzi::MillisecondTranslator
 Translates time from string in milliseconds to chrono::duration type. More...
 
struct  kanzi::ModuleNameListTranslator
 Translates from string to module name list. More...
 
struct  kanzi::PreferredGPUTranslator
 Converts string to preferred GPU selection type setting. More...
 
struct  kanzi::PresentModeTranslator
 Translates present mode property from string to PresentMode. More...
 
struct  kanzi::Slog2VerbosityLevelTranslator
 Translates verbosity level from string to Slog2VerbosityLevel type. More...
 
struct  kanzi::SurfaceClientAPITranslator
 Translates surface client API property from string to SurfaceClientAPI. More...
 
struct  kanzi::SwapBehaviorTranslator
 Translates swap behavior property from string to SwapBehavior. More...
 
struct  kanzi::TrimStringTranslator
 Removes quotes and spaces from the beginning and ending of a string. More...
 
struct  kanzi::WindowStyleTranslator
 Translates windows style property from string to KzsWindowStyle. More...
 

Namespaces

namespace  kanzi
 

Macros

#define KZ_FEATURE_LOAD_SETTINGS
 Enables loading of application properties.
 

Functions

void kanzi::load (ApplicationProperties &applicationProperties, const SystemProperties &systemProperties)
 Loads application properties from system properties.
 
void kanzi::load (ApplicationProperties &applicationProperties, string_view configurationFilePath)
 Loads application properties from configuration INI file.
 
void kanzi::loadSettings (ApplicationProperties &applicationProperties, const string_view configurationFilePath, const SystemProperties &systemProperties)
 Loads all properties, prioritizing command line parameters over configuration file parameters.
 
template<typename T >
kanzi::optional< Tkanzi::readProperty (const ptree &tree, const string &propertyName)
 Reads the value of a property from the property tree.
 
optional< string > kanzi::readProperty (const SystemProperties &systemProperties, const string &argumentString)
 Reads the value of a property from the system properties.
 
template<typename Translator >
optional< string > kanzi::readProperty (const SystemProperties &systemProperties, const string &argumentString, Translator translator)
 Reads the value of a property from the system properties and translates the value using a translator.
 
template<typename T , typename Translator >
kanzi::optional< Tkanzi::readProperty (ptree &tree, const string &propertyName, Translator translator)
 Reads the value of a property from a property tree and translates the value using a translator.
 
void kanzi::storeColorSpaceProperty (const kanzi::optional< string > &propertyValue, kanzi::SurfaceColorSpace &out_property)
 Saves a ColorSpace value from the application.cfg to the application properties.
 
void kanzi::storePerformanceInfoPropertyString (const kanzi::optional< string > &propertyValue, ApplicationProperties::PerformanceInfoLevel &out_property)
 Saves a Performance info level property value from an argument to the application properties.
 
template<typename T >
void kanzi::storeProperty (const kanzi::optional< string > &propertyValue, kanzi::optional< T > &out_property)
 Saves a property value from command line arguments to the application properties.
 
template<typename T >
enable_if_t< is_integral_v< T >, void > kanzi::storeProperty (const kanzi::optional< string > &propertyValue, T &out_property)
 
template<typename T >
void kanzi::storeProperty (const kanzi::optional< T > &propertyValue, const string &key, ApplicationProperties &applicationProperties)
 Saves a property value in the application.cfg to the system configuration.
 
template<typename T >
void kanzi::storeProperty (const kanzi::optional< T > &propertyValue, kanzi::optional< T > &out_property)
 Saves a property value from the application.cfg to the application properties.
 
template<typename T >
void kanzi::storeProperty (const kanzi::optional< T > &propertyValue, T &out_property)
 Saves a property value from the application.cfg to the application properties.
 
void kanzi::storeProperty (const kanzi::optional< unsigned int > &propertyValue, ApplicationProperties::PerformanceInfoLevel &out_property)
 Saves a Performance info level property value from the application.cfg to the application properties.
 
void kanzi::storeSurfaceProperty (const kanzi::optional< string > &propertyValue, kzInt &out_property)
 Saves a Surface property value from command line arguments to application properties.
 
void kanzi::stringToSurfacePropertyInt (const string &valueInString, kzInt &out_value)
 Converts string to number for surface properties.
 
SurfaceColorSpace kanzi::surfaceColorSpaceNameToEnum (string_view colorSpaceName)
 Converts a surface color space from string to enum.
 
string kanzi::to_string (gfx::GpuSelectionType type)
 Converts preferred GPU selection type enum to string.
 

Macro Definition Documentation

◆ KZ_FEATURE_LOAD_SETTINGS

#define KZ_FEATURE_LOAD_SETTINGS

Enables loading of application properties.

Reads property values from an application.cfg or from command line arguments and writes the values to application variables.

Note
Command line arguments won't be parsed without this feature.