////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All rights reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V7.4.1 (8cca6579792b9fcef3bc725ff070c5ec453c7c85)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  afbafelements.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "afbafelements.h"
#include "parametersetmanager.h"

AFBAFELEMENTS_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFCoringType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "coringEnable") == 0)
    {
        ParameterUtils::DoubleToString((double)coringEnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LUT") == 0)
    {
        if (__index < LUTFixedCount)
        {
            ParameterUtils::DoubleToString((double)LUT[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < LUTFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)LUT[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "coringThreshold") == 0)
    {
        ParameterUtils::DoubleToString((double)coringThreshold, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "coringGain") == 0)
    {
        ParameterUtils::DoubleToString((double)coringGain, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixBAFCoringType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "coringEnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            coringEnable = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LUT") == 0)
    {
        if (__index < LUTFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                LUT[__index] = (INT32)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < LUTFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    LUT[__index] = (INT32)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "coringThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            coringThreshold = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coringGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            coringGain = (INT32)dblValue; 
        }
    }

    return __result;
}

bool chromatixBAFCoringType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // coringEnable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("coringEnable", ParameterParserDataType::Int32, (double)coringEnable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "coringEnable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)coringEnable, 0));
    }

    // LUT
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("LUT", ParameterParserDataType::Int32, true, false, LUTFixedCount));
    }

    // coringThreshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("coringThreshold", ParameterParserDataType::Int32, (double)coringThreshold, 0));
    }
    else if (PARAMETER_STRCMP(__name, "coringThreshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)coringThreshold, 0));
    }

    // coringGain
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("coringGain", ParameterParserDataType::Int32, (double)coringGain, 0));
    }
    else if (PARAMETER_STRCMP(__name, "coringGain") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)coringGain, 0));
    }

    return __result;
}

bool chromatixBAFCoringPresetType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFCoringPresetType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFCoringPresetType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // preset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("preset", ParameterParserDataType::Structure, true, false, presetCount));
    }
    else if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, presetCount));
        }
    }

    return __result;
}

bool chromatixBAFIIRType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "IIREnable") == 0)
    {
        ParameterUtils::DoubleToString((double)IIREnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "coefficients") == 0)
    {
        if (__index < coefficientsFixedCount)
        {
            ParameterUtils::DoubleToString((double)coefficients[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < coefficientsFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)coefficients[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "initState") == 0)
    {
        if (__index < initStateCount)
        {
            ParameterUtils::DoubleToString((double)initState[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < initStateCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)initState[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "initMode") == 0)
    {
        if (__index < initModeFixedCount)
        {
            ParameterUtils::DoubleToString((double)initMode[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < initModeFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)initMode[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool chromatixBAFIIRType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "IIREnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            IIREnable = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coefficients") == 0)
    {
        if (__index < coefficientsFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                coefficients[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < coefficientsFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    coefficients[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "initState") == 0)
    {
        if (__index < initStateCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                initState[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < initStateCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    initState[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "initMode") == 0)
    {
        if (__index < initModeFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                initMode[__index] = (globalelements::enable_flag_type)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < initModeFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    initMode[__index] = (globalelements::enable_flag_type)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool chromatixBAFIIRType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // IIREnable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("IIREnable", ParameterParserDataType::Int32, (double)IIREnable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "IIREnable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)IIREnable, 0));
    }

    // coefficients
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("coefficients", ParameterParserDataType::Float, true, false, coefficientsFixedCount));
    }

    // initState
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("initState", ParameterParserDataType::Float, true, false, initStateCount));
    }

    // initMode
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("initMode", ParameterParserDataType::Int32, true, false, initModeFixedCount));
    }

    return __result;
}

bool chromatixBAFIIRPresetType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFIIRPresetType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFIIRPresetType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // preset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("preset", ParameterParserDataType::Structure, true, false, presetCount));
    }
    else if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, presetCount));
        }
    }

    return __result;
}

bool chromatixBAFFIRType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "FIREnable") == 0)
    {
        ParameterUtils::DoubleToString((double)FIREnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "coefficients") == 0)
    {
        if (__index < coefficientsFixedCount)
        {
            ParameterUtils::DoubleToString((double)coefficients[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < coefficientsFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)coefficients[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool chromatixBAFFIRType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "FIREnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FIREnable = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coefficients") == 0)
    {
        if (__index < coefficientsFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                coefficients[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < coefficientsFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    coefficients[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool chromatixBAFFIRType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // FIREnable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("FIREnable", ParameterParserDataType::Int32, (double)FIREnable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "FIREnable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)FIREnable, 0));
    }

    // coefficients
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("coefficients", ParameterParserDataType::Float, true, false, coefficientsFixedCount));
    }

    return __result;
}

bool chromatixBAFFIRPresetType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFFIRPresetType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFFIRPresetType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // preset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("preset", ParameterParserDataType::Structure, true, false, presetCount));
    }
    else if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, presetCount));
        }
    }

    return __result;
}

bool chromatixBAFScalerSettings::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "scalerEnable") == 0)
    {
        ParameterUtils::DoubleToString((double)scalerEnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "MNScalerMval") == 0)
    {
        ParameterUtils::DoubleToString((double)MNScalerMval, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "MNScalerNval") == 0)
    {
        ParameterUtils::DoubleToString((double)MNScalerNval, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "Scalerval") == 0)
    {
        ParameterUtils::DoubleToString((double)Scalerval, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixBAFScalerSettings::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "scalerEnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scalerEnable = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "MNScalerMval") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            MNScalerMval = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "MNScalerNval") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            MNScalerNval = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "Scalerval") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            Scalerval = (INT32)dblValue; 
        }
    }

    return __result;
}

bool chromatixBAFScalerSettings::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // scalerEnable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("scalerEnable", ParameterParserDataType::Int32, (double)scalerEnable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "scalerEnable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)scalerEnable, 0));
    }

    // MNScalerMval
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("MNScalerMval", ParameterParserDataType::Int32, (double)MNScalerMval, 0));
    }
    else if (PARAMETER_STRCMP(__name, "MNScalerMval") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)MNScalerMval, 0));
    }

    // MNScalerNval
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("MNScalerNval", ParameterParserDataType::Int32, (double)MNScalerNval, 0));
    }
    else if (PARAMETER_STRCMP(__name, "MNScalerNval") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)MNScalerNval, 0));
    }

    // Scalerval
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("Scalerval", ParameterParserDataType::Int32, (double)Scalerval, 0));
    }
    else if (PARAMETER_STRCMP(__name, "Scalerval") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)Scalerval, 0));
    }

    return __result;
}

bool chromatixBAFScalerPresetType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFScalerPresetType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFScalerPresetType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // preset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("preset", ParameterParserDataType::Structure, true, false, presetCount));
    }
    else if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, presetCount));
        }
    }

    return __result;
}

bool chromatixBAFGammaSettingType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "table") == 0)
    {
        if (__index < tableFixedCount)
        {
            ParameterUtils::DoubleToString((double)table[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < tableFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)table[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool chromatixBAFGammaSettingType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "table") == 0)
    {
        if (__index < tableFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                table[__index] = (INT32)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < tableFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    table[__index] = (INT32)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool chromatixBAFGammaSettingType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enable", ParameterParserDataType::Boolean, (double)enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enable, 0));
    }

    // table
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("table", ParameterParserDataType::Int32, true, false, tableFixedCount));
    }

    return __result;
}

bool chromatixBAFGammaPresetType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFGammaPresetType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFGammaPresetType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // preset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("preset", ParameterParserDataType::Structure, true, false, presetCount));
    }
    else if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, presetCount));
        }
    }

    return __result;
}

bool chromatixBAFBLSSettings::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "BLSOffset") == 0)
    {
        ParameterUtils::DoubleToString((double)BLSOffset, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "BLSLinearScale") == 0)
    {
        ParameterUtils::DoubleToString((double)BLSLinearScale, __value, __size);
        __result = true;
    }

    return __result;
}

bool chromatixBAFBLSSettings::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "BLSOffset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            BLSOffset = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "BLSLinearScale") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            BLSLinearScale = (float)dblValue; 
        }
    }

    return __result;
}

bool chromatixBAFBLSSettings::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // BLSOffset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BLSOffset", ParameterParserDataType::Int32, (double)BLSOffset, 0));
    }
    else if (PARAMETER_STRCMP(__name, "BLSOffset") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)BLSOffset, 0));
    }

    // BLSLinearScale
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BLSLinearScale", ParameterParserDataType::Float, (double)BLSLinearScale));
    }
    else if (PARAMETER_STRCMP(__name, "BLSLinearScale") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)BLSLinearScale));
    }

    return __result;
}

bool chromatixBAFChannelSettings::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "ChannelSelect") == 0)
    {
        ParameterUtils::DoubleToString((double)ChannelSelect, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gbgrChannelSelect") == 0)
    {
        ParameterUtils::DoubleToString((double)gbgrChannelSelect, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "yConversionEnable") == 0)
    {
        ParameterUtils::DoubleToString((double)yConversionEnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "RGBToYCoefficients") == 0)
    {
        if (__index < RGBToYCoefficientsFixedCount)
        {
            ParameterUtils::DoubleToString((double)RGBToYCoefficients[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < RGBToYCoefficientsFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)RGBToYCoefficients[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "BLSEnable") == 0)
    {
        ParameterUtils::DoubleToString((double)BLSEnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "BLSSettings") == 0)
    {
        __result = BLSSettings.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixBAFChannelSettings::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "ChannelSelect") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ChannelSelect = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gbgrChannelSelect") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gbgrChannelSelect = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "yConversionEnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            yConversionEnable = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "RGBToYCoefficients") == 0)
    {
        if (__index < RGBToYCoefficientsFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                RGBToYCoefficients[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < RGBToYCoefficientsFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    RGBToYCoefficients[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "BLSEnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            BLSEnable = (globalelements::enable_flag_type)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "BLSSettings") == 0)
    {
        __result = BLSSettings.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool chromatixBAFChannelSettings::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // ChannelSelect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ChannelSelect", ParameterParserDataType::Int32, (double)ChannelSelect, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ChannelSelect") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)ChannelSelect, 0));
    }

    // gbgrChannelSelect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("gbgrChannelSelect", ParameterParserDataType::Int32, (double)gbgrChannelSelect, 0));
    }
    else if (PARAMETER_STRCMP(__name, "gbgrChannelSelect") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)gbgrChannelSelect, 0));
    }

    // yConversionEnable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("yConversionEnable", ParameterParserDataType::Int32, (double)yConversionEnable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "yConversionEnable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)yConversionEnable, 0));
    }

    // RGBToYCoefficients
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("RGBToYCoefficients", ParameterParserDataType::Float, true, false, RGBToYCoefficientsFixedCount));
    }

    // BLSEnable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BLSEnable", ParameterParserDataType::Int32, (double)BLSEnable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "BLSEnable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)BLSEnable, 0));
    }

    // BLSSettings
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BLSSettings", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BLSSettings") == 0)
    {
        __result = BLSSettings.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool chromatixBAFInputPresetType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFInputPresetType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFInputPresetType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // preset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("preset", ParameterParserDataType::Structure, true, false, presetCount));
    }
    else if (PARAMETER_STRCMP(__name, "preset") == 0)
    {
        if (__index < presetCount)
        {
            __result = preset[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, presetCount));
        }
    }

    return __result;
}

bool chromatixBAFFilterIndexType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "FIRIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)FIRIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "IIRIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)IIRIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "coringIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)coringIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "bitshift") == 0)
    {
        ParameterUtils::DoubleToString((double)bitshift, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixBAFFilterIndexType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "FIRIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FIRIndex = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "IIRIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            IIRIndex = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coringIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            coringIndex = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "bitshift") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bitshift = (INT32)dblValue; 
        }
    }

    return __result;
}

bool chromatixBAFFilterIndexType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // FIRIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("FIRIndex", ParameterParserDataType::Int32, (double)FIRIndex, 0));
    }
    else if (PARAMETER_STRCMP(__name, "FIRIndex") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)FIRIndex, 0));
    }

    // IIRIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("IIRIndex", ParameterParserDataType::Int32, (double)IIRIndex, 0));
    }
    else if (PARAMETER_STRCMP(__name, "IIRIndex") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)IIRIndex, 0));
    }

    // coringIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("coringIndex", ParameterParserDataType::Int32, (double)coringIndex, 0));
    }
    else if (PARAMETER_STRCMP(__name, "coringIndex") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)coringIndex, 0));
    }

    // bitshift
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("bitshift", ParameterParserDataType::Int32, (double)bitshift, 0));
    }
    else if (PARAMETER_STRCMP(__name, "bitshift") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)bitshift, 0));
    }

    return __result;
}

bool chromatixPresetIndexType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "inputIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)inputIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gammaIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)gammaIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "scalerIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)scalerIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "horizontalFilter") == 0)
    {
        __result = horizontalFilter.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "verticalFilter") == 0)
    {
        __result = verticalFilter.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixPresetIndexType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "inputIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            inputIndex = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gammaIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gammaIndex = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "scalerIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scalerIndex = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "horizontalFilter") == 0)
    {
        __result = horizontalFilter.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "verticalFilter") == 0)
    {
        __result = verticalFilter.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool chromatixPresetIndexType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // inputIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("inputIndex", ParameterParserDataType::Int32, (double)inputIndex, 0));
    }
    else if (PARAMETER_STRCMP(__name, "inputIndex") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)inputIndex, 0));
    }

    // gammaIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("gammaIndex", ParameterParserDataType::Int32, (double)gammaIndex, 0));
    }
    else if (PARAMETER_STRCMP(__name, "gammaIndex") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)gammaIndex, 0));
    }

    // scalerIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("scalerIndex", ParameterParserDataType::Int32, (double)scalerIndex, 0));
    }
    else if (PARAMETER_STRCMP(__name, "scalerIndex") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)scalerIndex, 0));
    }

    // horizontalFilter
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("horizontalFilter", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "horizontalFilter") == 0)
    {
        __result = horizontalFilter.GetInfo(&__path[__pos], __info);
    }

    // verticalFilter
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("verticalFilter", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "verticalFilter") == 0)
    {
        __result = verticalFilter.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool chromatixBAFConfigureType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "type") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)type, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "presetIndex") == 0)
    {
        __result = presetIndex.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixBAFConfigureType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "type") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            type = (AFConfigureType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "presetIndex") == 0)
    {
        __result = presetIndex.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool chromatixBAFConfigureType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // type
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("type", ParameterParserDataType::Enum, (double)(UINT32)type, 0));
    }
    else if (PARAMETER_STRCMP(__name, "type") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)type, 0));
    }

    // presetIndex
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("presetIndex", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "presetIndex") == 0)
    {
        __result = presetIndex.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool chromatixBAFConfiguresType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "configure") == 0)
    {
        if (__index < configureCount)
        {
            __result = configure[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixBAFConfiguresType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "configure") == 0)
    {
        if (__index < configureCount)
        {
            __result = configure[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool chromatixBAFConfiguresType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // configure
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("configure", ParameterParserDataType::Structure, true, false, configureCount));
    }
    else if (PARAMETER_STRCMP(__name, "configure") == 0)
    {
        if (__index < configureCount)
        {
            __result = configure[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, configureCount));
        }
    }

    return __result;
}

bool chromatixBAFType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "configures") == 0)
    {
        __result = configures.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BAFInputPresets") == 0)
    {
        __result = BAFInputPresets.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BAFGammaPresets") == 0)
    {
        __result = BAFGammaPresets.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BAFScalerPresets") == 0)
    {
        __result = BAFScalerPresets.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BAFFIRPresets") == 0)
    {
        __result = BAFFIRPresets.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BAFIIRPresets") == 0)
    {
        __result = BAFIIRPresets.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BAFCoringPresets") == 0)
    {
        __result = BAFCoringPresets.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixBAFType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "configures") == 0)
    {
        __result = configures.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BAFInputPresets") == 0)
    {
        __result = BAFInputPresets.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BAFGammaPresets") == 0)
    {
        __result = BAFGammaPresets.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BAFScalerPresets") == 0)
    {
        __result = BAFScalerPresets.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BAFFIRPresets") == 0)
    {
        __result = BAFFIRPresets.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BAFIIRPresets") == 0)
    {
        __result = BAFIIRPresets.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BAFCoringPresets") == 0)
    {
        __result = BAFCoringPresets.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool chromatixBAFType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // module_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("module_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetInfo(&__path[__pos], __info);
    }

    // parameter_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("parameter_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetInfo(&__path[__pos], __info);
    }

    // configures
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("configures", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "configures") == 0)
    {
        __result = configures.GetInfo(&__path[__pos], __info);
    }

    // BAFInputPresets
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BAFInputPresets", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BAFInputPresets") == 0)
    {
        __result = BAFInputPresets.GetInfo(&__path[__pos], __info);
    }

    // BAFGammaPresets
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BAFGammaPresets", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BAFGammaPresets") == 0)
    {
        __result = BAFGammaPresets.GetInfo(&__path[__pos], __info);
    }

    // BAFScalerPresets
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BAFScalerPresets", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BAFScalerPresets") == 0)
    {
        __result = BAFScalerPresets.GetInfo(&__path[__pos], __info);
    }

    // BAFFIRPresets
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BAFFIRPresets", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BAFFIRPresets") == 0)
    {
        __result = BAFFIRPresets.GetInfo(&__path[__pos], __info);
    }

    // BAFIIRPresets
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BAFIIRPresets", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BAFIIRPresets") == 0)
    {
        __result = BAFIIRPresets.GetInfo(&__path[__pos], __info);
    }

    // BAFCoringPresets
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BAFCoringPresets", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BAFCoringPresets") == 0)
    {
        __result = BAFCoringPresets.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool chromatixBAFType::module_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)major_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)minor_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)incr_revision, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixBAFType::module_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            major_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minor_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            incr_revision = (INT32)dblValue; 
        }
    }

    return __result;
}

bool chromatixBAFType::module_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // major_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("major_revision", ParameterParserDataType::Int32, (double)major_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)major_revision, 0));
    }

    // minor_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("minor_revision", ParameterParserDataType::Int32, (double)minor_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)minor_revision, 0));
    }

    // incr_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("incr_revision", ParameterParserDataType::Int32, (double)incr_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)incr_revision, 0));
    }

    return __result;
}

bool chromatixBAFType::parameter_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        PARAMETER_STRCPY(__value, __size, revision);
        __result = true;
    }

    return __result;
}

bool chromatixBAFType::parameter_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const /*__value*/)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }

    return __result;
}

bool chromatixBAFType::parameter_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    (void)ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("revision", ParameterParserDataType::String, revision));
    }
    else if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::String, revision));
    }

    return __result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixBAFTypeClass::chromatixBAFTypeClass(
    const CHAR* name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(configures);
    PARAMETER_INITIALIZE(BAFInputPresets);
    PARAMETER_INITIALIZE(BAFGammaPresets);
    PARAMETER_INITIALIZE(BAFScalerPresets);
    PARAMETER_INITIALIZE(BAFFIRPresets);
    PARAMETER_INITIALIZE(BAFIIRPresets);
    PARAMETER_INITIALIZE(BAFCoringPresets);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixBAFTypeClass::chromatixBAFTypeClass(
    const CHAR*       name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(configures);
    PARAMETER_INITIALIZE(BAFInputPresets);
    PARAMETER_INITIALIZE(BAFGammaPresets);
    PARAMETER_INITIALIZE(BAFScalerPresets);
    PARAMETER_INITIALIZE(BAFFIRPresets);
    PARAMETER_INITIALIZE(BAFIIRPresets);
    PARAMETER_INITIALIZE(BAFCoringPresets);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Destructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixBAFTypeClass::~chromatixBAFTypeClass()
{
    if (Loaded)
    {
        UnloadModule();
    }
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFCoringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFCoringType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(coringEnable);
    PARAMETER_INITIALIZE(LUT);
    PARAMETER_INITIALIZE(coringThreshold);
    PARAMETER_INITIALIZE(coringGain);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x862cbfe586b50553;
        entry->ReadSimpleTypeFixedArray(&coringEnable, 1, localParams);
        localParams.NameHash = 0x878eccd52d56124a;
        entry->ReadSimpleTypeFixedArray<INT32>(LUT, LUTFixedCount,
            localParams);
        localParams.NameHash = 0x9b286a517d4f5f7d;
        entry->ReadSimpleTypeFixedArray(&coringThreshold, 1, localParams);
        localParams.NameHash = 0xc5da0cc92a74ee44;
        entry->ReadSimpleTypeFixedArray(&coringGain, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFCoringType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFCoringType* arrayPtr = (chromatixBAFCoringType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFCoringType::AllocArray(
    UINT32 __count)
{
    chromatixBAFCoringType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFCoringType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFCoringPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFCoringPresetType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(presetCount);
    PARAMETER_INITIALIZE(preset);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x8cf41ba2b7cb3614;
        entry->ReadStructureArray(preset, presetCount, presetID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFCoringPresetType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFCoringPresetType* arrayPtr = (chromatixBAFCoringPresetType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFCoringPresetType::AllocArray(
    UINT32 __count)
{
    chromatixBAFCoringPresetType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFCoringPresetType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFIIRType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFIIRType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(IIREnable);
    PARAMETER_INITIALIZE(coefficients);
    PARAMETER_INITIALIZE(initStateCount);
    PARAMETER_INITIALIZE(initState);
    PARAMETER_INITIALIZE(initMode);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xce37cb88b98ac26e;
        entry->ReadSimpleTypeFixedArray(&IIREnable, 1, localParams);
        localParams.NameHash = 0xb112b1166f2f72d1;
        entry->ReadSimpleTypeFixedArray<float>(coefficients, coefficientsFixedCount,
            localParams);
        localParams.NameHash = 0xc81a5cd235aae070;
        entry->ReadSimpleTypeArray(initState, initStateCount, initStateID, 2,
            localParams, __COUNTER__);
        localParams.NameHash = 0xc8ee4bf78a9ee6ee;
        entry->ReadSimpleTypeFixedArray<globalelements::enable_flag_type>(initMode, initModeFixedCount,
            localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFIIRType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFIIRType* arrayPtr = (chromatixBAFIIRType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFIIRType::AllocArray(
    UINT32 __count)
{
    chromatixBAFIIRType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFIIRType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFIIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFIIRPresetType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(presetCount);
    PARAMETER_INITIALIZE(preset);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x8cf41ba2b7cb3614;
        entry->ReadStructureArray(preset, presetCount, presetID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFIIRPresetType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFIIRPresetType* arrayPtr = (chromatixBAFIIRPresetType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFIIRPresetType::AllocArray(
    UINT32 __count)
{
    chromatixBAFIIRPresetType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFIIRPresetType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFFIRType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFFIRType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(FIREnable);
    PARAMETER_INITIALIZE(coefficients);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xf9c769269ac4e795;
        entry->ReadSimpleTypeFixedArray(&FIREnable, 1, localParams);
        localParams.NameHash = 0xb112b1166f2f72d1;
        entry->ReadSimpleTypeFixedArray<float>(coefficients, coefficientsFixedCount,
            localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFFIRType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFFIRType* arrayPtr = (chromatixBAFFIRType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFFIRType::AllocArray(
    UINT32 __count)
{
    chromatixBAFFIRType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFFIRType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFFIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFFIRPresetType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(presetCount);
    PARAMETER_INITIALIZE(preset);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x8cf41ba2b7cb3614;
        entry->ReadStructureArray(preset, presetCount, presetID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFFIRPresetType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFFIRPresetType* arrayPtr = (chromatixBAFFIRPresetType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFFIRPresetType::AllocArray(
    UINT32 __count)
{
    chromatixBAFFIRPresetType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFFIRPresetType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFScalerSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFScalerSettings::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(scalerEnable);
    PARAMETER_INITIALIZE(MNScalerMval);
    PARAMETER_INITIALIZE(MNScalerNval);
    PARAMETER_INITIALIZE(Scalerval);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x87eea57f727a4e74;
        entry->ReadSimpleTypeFixedArray(&scalerEnable, 1, localParams);
        localParams.NameHash = 0xc13443348602a100;
        entry->ReadSimpleTypeFixedArray(&MNScalerMval, 1, localParams);
        localParams.NameHash = 0xb5639952b8293636;
        entry->ReadSimpleTypeFixedArray(&MNScalerNval, 1, localParams);
        localParams.NameHash = 0xa3f2d667f1f9003e;
        entry->ReadSimpleTypeFixedArray(&Scalerval, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFScalerSettings::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFScalerSettings* arrayPtr = (chromatixBAFScalerSettings*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFScalerSettings::AllocArray(
    UINT32 __count)
{
    chromatixBAFScalerSettings* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFScalerSettings[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFScalerPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFScalerPresetType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(presetCount);
    PARAMETER_INITIALIZE(preset);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x8cf41ba2b7cb3614;
        entry->ReadStructureArray(preset, presetCount, presetID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFScalerPresetType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFScalerPresetType* arrayPtr = (chromatixBAFScalerPresetType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFScalerPresetType::AllocArray(
    UINT32 __count)
{
    chromatixBAFScalerPresetType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFScalerPresetType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFGammaSettingType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFGammaSettingType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(table);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xb3c00adf8e304e57;
        entry->ReadSimpleTypeFixedArray(&enable, 1, localParams);
        localParams.NameHash = 0xa17d4c271f7d3d4e;
        entry->ReadSimpleTypeFixedArray<INT32>(table, tableFixedCount,
            localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFGammaSettingType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFGammaSettingType* arrayPtr = (chromatixBAFGammaSettingType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFGammaSettingType::AllocArray(
    UINT32 __count)
{
    chromatixBAFGammaSettingType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFGammaSettingType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFGammaPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFGammaPresetType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(presetCount);
    PARAMETER_INITIALIZE(preset);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x8cf41ba2b7cb3614;
        entry->ReadStructureArray(preset, presetCount, presetID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFGammaPresetType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFGammaPresetType* arrayPtr = (chromatixBAFGammaPresetType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFGammaPresetType::AllocArray(
    UINT32 __count)
{
    chromatixBAFGammaPresetType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFGammaPresetType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFBLSSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFBLSSettings::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(BLSOffset);
    PARAMETER_INITIALIZE(BLSLinearScale);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xcb6bd3c68dad2767;
        entry->ReadSimpleTypeFixedArray(&BLSOffset, 1, localParams);
        localParams.NameHash = 0x847973847cebb108;
        entry->ReadSimpleTypeFixedArray(&BLSLinearScale, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFBLSSettings::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFBLSSettings* arrayPtr = (chromatixBAFBLSSettings*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFBLSSettings::AllocArray(
    UINT32 __count)
{
    chromatixBAFBLSSettings* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFBLSSettings[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFChannelSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFChannelSettings::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(ChannelSelect);
    PARAMETER_INITIALIZE(gbgrChannelSelect);
    PARAMETER_INITIALIZE(yConversionEnable);
    PARAMETER_INITIALIZE(RGBToYCoefficients);
    PARAMETER_INITIALIZE(BLSEnable);
    PARAMETER_INITIALIZE(BLSSettings);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xd244eb635a56e24b;
        entry->ReadSimpleTypeFixedArray(&ChannelSelect, 1, localParams);
        localParams.NameHash = 0x9cd6bf8264a1dd2b;
        entry->ReadSimpleTypeFixedArray(&gbgrChannelSelect, 1, localParams);
        localParams.NameHash = 0xa372db9a64172a8e;
        entry->ReadSimpleTypeFixedArray(&yConversionEnable, 1, localParams);
        localParams.NameHash = 0xb1bdf4544bb1c7f0;
        entry->ReadSimpleTypeFixedArray<float>(RGBToYCoefficients, RGBToYCoefficientsFixedCount,
            localParams);
        localParams.NameHash = 0xc259e341bd5a5cce;
        entry->ReadSimpleTypeFixedArray(&BLSEnable, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xf5496dcc1b560e39;
        BLSSettings.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFChannelSettings::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFChannelSettings* arrayPtr = (chromatixBAFChannelSettings*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFChannelSettings::AllocArray(
    UINT32 __count)
{
    chromatixBAFChannelSettings* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFChannelSettings[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFInputPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFInputPresetType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(presetCount);
    PARAMETER_INITIALIZE(preset);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0x8cf41ba2b7cb3614;
        entry->ReadStructureArray(preset, presetCount, presetID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFInputPresetType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFInputPresetType* arrayPtr = (chromatixBAFInputPresetType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFInputPresetType::AllocArray(
    UINT32 __count)
{
    chromatixBAFInputPresetType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFInputPresetType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFFilterIndexType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFFilterIndexType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(FIRIndex);
    PARAMETER_INITIALIZE(IIRIndex);
    PARAMETER_INITIALIZE(coringIndex);
    PARAMETER_INITIALIZE(bitshift);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xc5fb20fb5c74fb89;
        entry->ReadSimpleTypeFixedArray(&FIRIndex, 1, localParams);
        localParams.NameHash = 0xc99810014c35300d;
        entry->ReadSimpleTypeFixedArray(&IIRIndex, 1, localParams);
        localParams.NameHash = 0xdf34e5598a24fe85;
        entry->ReadSimpleTypeFixedArray(&coringIndex, 1, localParams);
        localParams.NameHash = 0xb2adabfcd49cf497;
        entry->ReadSimpleTypeFixedArray(&bitshift, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFFilterIndexType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFFilterIndexType* arrayPtr = (chromatixBAFFilterIndexType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFFilterIndexType::AllocArray(
    UINT32 __count)
{
    chromatixBAFFilterIndexType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFFilterIndexType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixPresetIndexType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixPresetIndexType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(inputIndex);
    PARAMETER_INITIALIZE(gammaIndex);
    PARAMETER_INITIALIZE(scalerIndex);
    PARAMETER_INITIALIZE(horizontalFilter);
    PARAMETER_INITIALIZE(verticalFilter);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xa97f24fd6e2f983b;
        entry->ReadSimpleTypeFixedArray(&inputIndex, 1, localParams);
        localParams.NameHash = 0xe3e690206202db5b;
        entry->ReadSimpleTypeFixedArray(&gammaIndex, 1, localParams);
        localParams.NameHash = 0x930c3bd4b1136eec;
        entry->ReadSimpleTypeFixedArray(&scalerIndex, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xc53e892b33af0870;
        horizontalFilter.Load(localParams);
        localParams.NameHash        = 0x82e91620acb48e8f;
        verticalFilter.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixPresetIndexType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixPresetIndexType* arrayPtr = (chromatixPresetIndexType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixPresetIndexType::AllocArray(
    UINT32 __count)
{
    chromatixPresetIndexType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixPresetIndexType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFConfigureType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFConfigureType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(type);
    PARAMETER_INITIALIZE(presetIndex);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xd7a23f43d1e0d686;
        entry->ReadEnumFixedArray(&type, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xb0e039af72f4f9fd;
        presetIndex.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFConfigureType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFConfigureType* arrayPtr = (chromatixBAFConfigureType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFConfigureType::AllocArray(
    UINT32 __count)
{
    chromatixBAFConfigureType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFConfigureType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFConfiguresType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFConfiguresType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(configureCount);
    PARAMETER_INITIALIZE(configure);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xc705b6a935d636bd;
        entry->ReadStructureArray(configure, configureCount, configureID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFConfiguresType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFConfiguresType* arrayPtr = (chromatixBAFConfiguresType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFConfiguresType::AllocArray(
    UINT32 __count)
{
    chromatixBAFConfiguresType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFConfiguresType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(configures);
    PARAMETER_INITIALIZE(BAFInputPresets);
    PARAMETER_INITIALIZE(BAFGammaPresets);
    PARAMETER_INITIALIZE(BAFScalerPresets);
    PARAMETER_INITIALIZE(BAFFIRPresets);
    PARAMETER_INITIALIZE(BAFIIRPresets);
    PARAMETER_INITIALIZE(BAFCoringPresets);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash        = 0xca3106e199a12935;
        parameter_version.Load(localParams);
        localParams.NameHash        = 0xe30b1834866dc6d6;
        configures.Load(localParams);
        localParams.NameHash        = 0x8176f6ac78da30ad;
        BAFInputPresets.Load(localParams);
        localParams.NameHash        = 0xfc76cca458cdb84a;
        BAFGammaPresets.Load(localParams);
        localParams.NameHash        = 0xf1a390bd8bfc0653;
        BAFScalerPresets.Load(localParams);
        localParams.NameHash        = 0xfdfd4d8db8e4b64e;
        BAFFIRPresets.Load(localParams);
        localParams.NameHash        = 0x9cd04afde1c45068;
        BAFIIRPresets.Load(localParams);
        localParams.NameHash        = 0xf127b364c65b1d75;
        BAFCoringPresets.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixBAFType* arrayPtr = (chromatixBAFType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFType::AllocArray(
    UINT32 __count)
{
    chromatixBAFType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW chromatixBAFType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFType::module_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xcd66249477636693;
        entry->ReadSimpleTypeFixedArray(&major_revision, 1, localParams);
        localParams.NameHash = 0xc5497493137a9c25;
        entry->ReadSimpleTypeFixedArray(&minor_revision, 1, localParams);
        localParams.NameHash = 0xb27b8a668efb2a56;
        entry->ReadSimpleTypeFixedArray(&incr_revision, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFType::module_versionStruct::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        module_versionStruct* arrayPtr = (module_versionStruct*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFType::module_versionStruct::AllocArray(
    UINT32 __count)
{
    module_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW module_versionStruct[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFType::parameter_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(revision);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xd594eed07a5650c5;
        entry->ReadStringFixedArray(&revision, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void chromatixBAFType::parameter_versionStruct::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        parameter_versionStruct* arrayPtr = (parameter_versionStruct*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* chromatixBAFType::parameter_versionStruct::AllocArray(
    UINT32 __count)
{
    parameter_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW parameter_versionStruct[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFCoringPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFCoringPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, preset);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFIIRType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFIIRType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, initState);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFIIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFIIRPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    for (UINT32 i = 0; preset != nullptr && i < presetCount; i++)
    {
        preset[i].Unload(__table);
    }
    ParameterFileSymbolTable::ReleaseObject(__table, preset);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFFIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFFIRPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, preset);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFScalerPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFScalerPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, preset);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFGammaPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFGammaPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, preset);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFInputPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFInputPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, preset);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFConfiguresType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFConfiguresType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, configure);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    configures.Unload(__table);
    BAFInputPresets.Unload(__table);
    BAFGammaPresets.Unload(__table);
    BAFScalerPresets.Unload(__table);
    BAFFIRPresets.Unload(__table);
    BAFIIRPresets.Unload(__table);
    BAFCoringPresets.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFType::parameter_versionStruct::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, revision);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Release the ParameterModule object
/// Requires that this object was created via a ParameterSetManager::GetModule call
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFType::Release()
{
    ((chromatixBAFTypeClass*)this)->Release();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Returns the ParameterModule::Modified value
/// The Modified value is incremented when the module's data or pointer values change
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT32 chromatixBAFType::GetModified()
{
    return ((chromatixBAFTypeClass*)this)->Modified;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetModuleName: Returns ParameterModule::Name variable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* chromatixBAFType::GetModuleName()
{
    return ((chromatixBAFTypeClass*)this)->Name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetModuleName: Returns ParameterModule::NameHash variable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT64 chromatixBAFType::GetModuleNameHash()
{
    return ((chromatixBAFTypeClass*)this)->NameHash;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* chromatixBAFTypeClass::Create(
    ModuleData* const    moduleData,
    DefaultModule* const defModule) const
{
    chromatixBAFTypeClass* cls = nullptr;

    if (IsModuleMatch(moduleData) && Version.Value == moduleData->Version.Value)
    {
        const UINT32 id = moduleData->DuplicateID > 0 ? moduleData->DuplicateID : moduleData->ID;

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (chromatixBAFTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW chromatixBAFTypeClass(Name, moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixBAFTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixBAFTypeClass, binary name hash (0x%016llx) does not match source name hash (0x%016llx)\n",
            moduleData->NameHash, NameHash);
    }

    return (ParameterModule*)cls;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module data, return true is successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFTypeClass::LoadModule(
    ParameterFileSymbolTable* const table)
{
    bool result = true;

#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

    if (!Loaded)
    {
        chromatixBAFTypeClass* const cls = this;

        ParameterFileSymbolTableEntry  entryObj;
        ParameterFileSymbolTableEntry* const entry = &entryObj;
        // With EzTune enabled, the unused upper byte of SymbolTableID value can change, so clear it
        result = table->Find(entryObj, SymbolTableID & 0x00ffffffU);

        if (!result)
        {
            PARAMETER_LOG_ERROR(entry->Table->SetManager, "chromatixBAFTypeClass::LoadModule Failed to find module ID (%d) in Symbol Table\n", SymbolTableID);
        }


        ParameterDefinitionElement* _element = nullptr;
        if (table->ModuleDefinitions != nullptr && !table->ModuleDefinitions->empty())
        {
            _element = table->BuildModuleElement(NameHash);
        }

        ParameterLoadParameters parentParams(entry, NameHash, true, true, _element, entry->Position, 0, ParameterFileSymbolTableEntry::LOAD_LIMIT_MAX);
        cls->Load(parentParams);
        PARAMETER_DELETE _element;
        Modified++;
        Loaded = true;
    }

    if (!result)
    {
        /// Module failed to fully load, unload it
        UnloadModule();
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFTypeClass::UnloadModule()
{
#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

    if (Loaded)
    {
        if (Data != nullptr && Data->SymbolTable != nullptr)
        {
            Unload(Data->SymbolTable);
        }
        else
        {
            PARAMETER_LOG_ERROR(Data != nullptr ? Data->SetManager : nullptr, "UnloadModule %s called with nullptr "
                "Data->SymbolTable object\n", Name);
            Unload(nullptr);
        }
        Loaded = false;
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// /// Release the ParameterModule object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFTypeClass::Release()
{
    ParameterModule::Release();
}

AFBAFELEMENTS_NAMESPACE_END
