////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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 V5.5.1 (2411131018)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @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;

    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 < 17)
        {
            ParameterUtils::DoubleToString((double)LUT[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 17; 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;

    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 < 17)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                LUT[__index] = (INT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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;

    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, 17));
    }

    // 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;

    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 < 10)
        {
            ParameterUtils::DoubleToString((double)coefficients[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 10; 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 < 2)
        {
            ParameterUtils::DoubleToString((double)initMode[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 2; 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;

    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 < 10)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                coefficients[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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 < 2)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                initMode[__index] = (globalelements::enable_flag_type)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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;

    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, 10));
    }

    // 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, 2));
    }

    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;

    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 < 13)
        {
            ParameterUtils::DoubleToString((double)coefficients[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 13; 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;

    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 < 13)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                coefficients[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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;

    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, 13));
    }

    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;

    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;

    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;

    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;

    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 < 32)
        {
            ParameterUtils::DoubleToString((double)table[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 32; 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;

    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 < 32)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                table[__index] = (INT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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;

    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, 32));
    }

    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;

    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;

    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;

    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 < 3)
        {
            ParameterUtils::DoubleToString((double)RGBToYCoefficients[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 3; 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 < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                RGBToYCoefficients[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                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, 3));
    }

    // 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;

    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;

    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;

    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;

    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;

    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;

    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;

    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;

    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;

    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;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_AFConfigureType(
    ParameterFileSymbolTableEntry* const entry,
    AFConfigureType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(AFConfigureType::AFDefault):
            enumValue = AFConfigureType::AFDefault;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFSpotlight):
            enumValue = AFConfigureType::AFSpotlight;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFFace):
            enumValue = AFConfigureType::AFFace;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFLowlight):
            enumValue = AFConfigureType::AFLowlight;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFHAFFinescan):
            enumValue = AFConfigureType::AFHAFFinescan;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFSingleFinesearch):
            enumValue = AFConfigureType::AFSingleFinesearch;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFCustom1):
            enumValue = AFConfigureType::AFCustom1;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFCustom2):
            enumValue = AFConfigureType::AFCustom2;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFCustom3):
            enumValue = AFConfigureType::AFCustom3;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFCustom4):
            enumValue = AFConfigureType::AFCustom4;
            result    = true;
            break;
        case static_cast<UINT32>(AFConfigureType::AFConfigureTypeCount):
            enumValue = AFConfigureType::AFConfigureTypeCount;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to AFConfigureType", uintValue);
            break;
        }
    }
    return result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixBAFTypeClass::chromatixBAFTypeClass(
    const CHAR* const 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* const 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();
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetName
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* chromatixBAFTypeClass::GetName(
    const CHAR* const type)
{
    const CHAR* name = type;
    CHAR temp[ParameterFileSymbolTableEntry::TYPE_LEN + 1];
    if (PARAMETER_STRCMP(type, ModuleData::GetType(temp, "chromatixBAF")) == 0)
    {
        name = "chromatixBAF";
    }
    return name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFCoringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFCoringType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(coringEnable);
    PARAMETER_INITIALIZE(LUT);
    PARAMETER_INITIALIZE(coringThreshold);
    PARAMETER_INITIALIZE(coringGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, coringEnable, alignment)
    if (result)
    {
        result = entry->ReadArray(LUT, 17, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, coringThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, coringGain, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFCoringPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFCoringPresetType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(preset);


    // Reading Array preset from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        presetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, presetCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            presetID = pointerEntry->ID;
            DupObjInfo* presetDupInfo = pointerEntry->GetDupObject(presetCount, file, line);
            if (presetDupInfo != nullptr && presetDupInfo->Object != nullptr)
            {
                preset = (chromatixBAFCoringType*)presetDupInfo->Object;
                if (preset == nullptr)
                {
                    if (presetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            presetDupInfo->File, presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                }
            }

            if (preset == nullptr)
            {
                if (result && presetCount > 0)
                {
                    preset = PARAMETER_NEW chromatixBAFCoringType[presetCount];
                    (void)pointerEntry->SetDupObject(preset, presetCount, file, line);
                }
                if (!result || preset == nullptr)
                {
                    if (presetCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate preset\n");
                    }
                    presetCount = 0;
                }
                for (UINT32 i = 0; result && i < presetCount; i++)
                {
                    result = preset[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (preset == nullptr)
        {
            presetCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFIIRType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFIIRType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(IIREnable);
    PARAMETER_INITIALIZE(coefficients);
    PARAMETER_INITIALIZE(initState);
    PARAMETER_INITIALIZE(initMode);

    SYMBOL_TABLE_ENTRY_READ(entry, result, IIREnable, alignment)
    if (result)
    {
        result = entry->ReadArray(coefficients, 10, alignment);
    }

    // Reading Array initState from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        initStateCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, initStateCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            initStateID = pointerEntry->ID;
            DupObjInfo* initStateDupInfo = pointerEntry->GetDupObject(initStateCount, file, line);
            if (initStateDupInfo != nullptr && initStateDupInfo->Object != nullptr)
            {
                initState = (float*)initStateDupInfo->Object;
                if (initState == nullptr)
                {
                    if (initStateDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "initState duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            initStateDupInfo->File, initStateDupInfo->Line, initStateDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "initState duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            initStateDupInfo->Line, initStateDupInfo->RefCount);
                    }
                }
            }

            if (initState == nullptr)
            {
                if (result && initStateCount > 0)
                {
                    initState = pointerEntry->ReadArray<float>(initStateCount, alignment);
                    result = initState != nullptr;
                }
                if (!result || initState == nullptr)
                {
                    if (initStateCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate initState\n");
                    }
                    initStateCount = 0;
                }
            }
        }
        if (initState == nullptr)
        {
            initStateCount = 0;
        }
    }
    if (result)
    {
        result = entry->ReadArray(initMode, 2, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFIIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFIIRPresetType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(preset);


    // Reading Array preset from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        presetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, presetCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            presetID = pointerEntry->ID;
            DupObjInfo* presetDupInfo = pointerEntry->GetDupObject(presetCount, file, line);
            if (presetDupInfo != nullptr && presetDupInfo->Object != nullptr)
            {
                preset = (chromatixBAFIIRType*)presetDupInfo->Object;
                if (preset == nullptr)
                {
                    if (presetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            presetDupInfo->File, presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                }
            }

            if (preset == nullptr)
            {
                if (result && presetCount > 0)
                {
                    preset = PARAMETER_NEW chromatixBAFIIRType[presetCount];
                    (void)pointerEntry->SetDupObject(preset, presetCount, file, line);
                }
                if (!result || preset == nullptr)
                {
                    if (presetCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate preset\n");
                    }
                    presetCount = 0;
                }
                for (UINT32 i = 0; result && i < presetCount; i++)
                {
                    result = preset[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (preset == nullptr)
        {
            presetCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFFIRType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFFIRType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(FIREnable);
    PARAMETER_INITIALIZE(coefficients);

    SYMBOL_TABLE_ENTRY_READ(entry, result, FIREnable, alignment)
    if (result)
    {
        result = entry->ReadArray(coefficients, 13, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFFIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFFIRPresetType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(preset);


    // Reading Array preset from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        presetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, presetCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            presetID = pointerEntry->ID;
            DupObjInfo* presetDupInfo = pointerEntry->GetDupObject(presetCount, file, line);
            if (presetDupInfo != nullptr && presetDupInfo->Object != nullptr)
            {
                preset = (chromatixBAFFIRType*)presetDupInfo->Object;
                if (preset == nullptr)
                {
                    if (presetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            presetDupInfo->File, presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                }
            }

            if (preset == nullptr)
            {
                if (result && presetCount > 0)
                {
                    preset = PARAMETER_NEW chromatixBAFFIRType[presetCount];
                    (void)pointerEntry->SetDupObject(preset, presetCount, file, line);
                }
                if (!result || preset == nullptr)
                {
                    if (presetCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate preset\n");
                    }
                    presetCount = 0;
                }
                for (UINT32 i = 0; result && i < presetCount; i++)
                {
                    result = preset[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (preset == nullptr)
        {
            presetCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFScalerSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFScalerSettings::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(scalerEnable);
    PARAMETER_INITIALIZE(MNScalerMval);
    PARAMETER_INITIALIZE(MNScalerNval);
    PARAMETER_INITIALIZE(Scalerval);

    SYMBOL_TABLE_ENTRY_READ(entry, result, scalerEnable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, MNScalerMval, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, MNScalerNval, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, Scalerval, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFScalerPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFScalerPresetType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(preset);


    // Reading Array preset from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        presetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, presetCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            presetID = pointerEntry->ID;
            DupObjInfo* presetDupInfo = pointerEntry->GetDupObject(presetCount, file, line);
            if (presetDupInfo != nullptr && presetDupInfo->Object != nullptr)
            {
                preset = (chromatixBAFScalerSettings*)presetDupInfo->Object;
                if (preset == nullptr)
                {
                    if (presetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            presetDupInfo->File, presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                }
            }

            if (preset == nullptr)
            {
                if (result && presetCount > 0)
                {
                    preset = PARAMETER_NEW chromatixBAFScalerSettings[presetCount];
                    (void)pointerEntry->SetDupObject(preset, presetCount, file, line);
                }
                if (!result || preset == nullptr)
                {
                    if (presetCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate preset\n");
                    }
                    presetCount = 0;
                }
                for (UINT32 i = 0; result && i < presetCount; i++)
                {
                    result = preset[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (preset == nullptr)
        {
            presetCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFGammaSettingType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFGammaSettingType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(table);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    if (result)
    {
        result = entry->ReadArray(table, 32, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFGammaPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFGammaPresetType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(preset);


    // Reading Array preset from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        presetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, presetCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            presetID = pointerEntry->ID;
            DupObjInfo* presetDupInfo = pointerEntry->GetDupObject(presetCount, file, line);
            if (presetDupInfo != nullptr && presetDupInfo->Object != nullptr)
            {
                preset = (chromatixBAFGammaSettingType*)presetDupInfo->Object;
                if (preset == nullptr)
                {
                    if (presetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            presetDupInfo->File, presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                }
            }

            if (preset == nullptr)
            {
                if (result && presetCount > 0)
                {
                    preset = PARAMETER_NEW chromatixBAFGammaSettingType[presetCount];
                    (void)pointerEntry->SetDupObject(preset, presetCount, file, line);
                }
                if (!result || preset == nullptr)
                {
                    if (presetCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate preset\n");
                    }
                    presetCount = 0;
                }
                for (UINT32 i = 0; result && i < presetCount; i++)
                {
                    result = preset[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (preset == nullptr)
        {
            presetCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFBLSSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFBLSSettings::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(BLSOffset);
    PARAMETER_INITIALIZE(BLSLinearScale);

    SYMBOL_TABLE_ENTRY_READ(entry, result, BLSOffset, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, BLSLinearScale, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFChannelSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFChannelSettings::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(ChannelSelect);
    PARAMETER_INITIALIZE(gbgrChannelSelect);
    PARAMETER_INITIALIZE(yConversionEnable);
    PARAMETER_INITIALIZE(RGBToYCoefficients);
    PARAMETER_INITIALIZE(BLSEnable);
    PARAMETER_INITIALIZE(BLSSettings);

    SYMBOL_TABLE_ENTRY_READ(entry, result, ChannelSelect, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, gbgrChannelSelect, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, yConversionEnable, alignment)
    if (result)
    {
        result = entry->ReadArray(RGBToYCoefficients, 3, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, BLSEnable, alignment)
    if (result)
    {
        result = BLSSettings.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFInputPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFInputPresetType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(preset);


    // Reading Array preset from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        presetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, presetCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            presetID = pointerEntry->ID;
            DupObjInfo* presetDupInfo = pointerEntry->GetDupObject(presetCount, file, line);
            if (presetDupInfo != nullptr && presetDupInfo->Object != nullptr)
            {
                preset = (chromatixBAFChannelSettings*)presetDupInfo->Object;
                if (preset == nullptr)
                {
                    if (presetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            presetDupInfo->File, presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "preset duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            presetDupInfo->Line, presetDupInfo->RefCount);
                    }
                }
            }

            if (preset == nullptr)
            {
                if (result && presetCount > 0)
                {
                    preset = PARAMETER_NEW chromatixBAFChannelSettings[presetCount];
                    (void)pointerEntry->SetDupObject(preset, presetCount, file, line);
                }
                if (!result || preset == nullptr)
                {
                    if (presetCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate preset\n");
                    }
                    presetCount = 0;
                }
                for (UINT32 i = 0; result && i < presetCount; i++)
                {
                    result = preset[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (preset == nullptr)
        {
            presetCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFFilterIndexType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFFilterIndexType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(FIRIndex);
    PARAMETER_INITIALIZE(IIRIndex);
    PARAMETER_INITIALIZE(coringIndex);
    PARAMETER_INITIALIZE(bitshift);

    SYMBOL_TABLE_ENTRY_READ(entry, result, FIRIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, IIRIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, coringIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, bitshift, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixPresetIndexType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixPresetIndexType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(inputIndex);
    PARAMETER_INITIALIZE(gammaIndex);
    PARAMETER_INITIALIZE(scalerIndex);
    PARAMETER_INITIALIZE(horizontalFilter);
    PARAMETER_INITIALIZE(verticalFilter);

    SYMBOL_TABLE_ENTRY_READ(entry, result, inputIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, gammaIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, scalerIndex, alignment)
    if (result)
    {
        result = horizontalFilter.Load(entry, alignment);
    }
    if (result)
    {
        result = verticalFilter.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFConfigureType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFConfigureType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(type);
    PARAMETER_INITIALIZE(presetIndex);

    result = afbafelements::ReadEnum_AFConfigureType(entry, type, alignment);
    if (result)
    {
        result = presetIndex.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFConfiguresType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFConfiguresType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(configure);


    // Reading Array configure from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        configureCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, configureCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            configureID = pointerEntry->ID;
            DupObjInfo* configureDupInfo = pointerEntry->GetDupObject(configureCount, file, line);
            if (configureDupInfo != nullptr && configureDupInfo->Object != nullptr)
            {
                configure = (chromatixBAFConfigureType*)configureDupInfo->Object;
                if (configure == nullptr)
                {
                    if (configureDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "configure duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            configureDupInfo->File, configureDupInfo->Line, configureDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "configure duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            configureDupInfo->Line, configureDupInfo->RefCount);
                    }
                }
            }

            if (configure == nullptr)
            {
                if (result && configureCount > 0)
                {
                    configure = PARAMETER_NEW chromatixBAFConfigureType[configureCount];
                    (void)pointerEntry->SetDupObject(configure, configureCount, file, line);
                }
                if (!result || configure == nullptr)
                {
                    if (configureCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate configure\n");
                    }
                    configureCount = 0;
                }
                for (UINT32 i = 0; result && i < configureCount; i++)
                {
                    result = configure[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (configure == nullptr)
        {
            configureCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixBAFType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    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);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = configures.Load(entry, alignment);
    }
    if (result)
    {
        result = BAFInputPresets.Load(entry, alignment);
    }
    if (result)
    {
        result = BAFGammaPresets.Load(entry, alignment);
    }
    if (result)
    {
        result = BAFScalerPresets.Load(entry, alignment);
    }
    if (result)
    {
        result = BAFFIRPresets.Load(entry, alignment);
    }
    if (result)
    {
        result = BAFIIRPresets.Load(entry, alignment);
    }
    if (result)
    {
        result = BAFCoringPresets.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFType::module_versionStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    SYMBOL_TABLE_ENTRY_READ(entry, result, major_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minor_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, incr_revision, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixBAFType::parameter_versionStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(revision);


    // Reading String revision from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, revision, count, alignment)
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFCoringPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFCoringPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(preset))
    {
        PARAMETER_DELETE[] preset;
    }
    preset = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFIIRType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFIIRType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(initState))
    {
        PARAMETER_DELETE[] initState;
    }
    initState = nullptr;
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFFIRPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFFIRPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(preset))
    {
        PARAMETER_DELETE[] preset;
    }
    preset = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFScalerPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFScalerPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(preset))
    {
        PARAMETER_DELETE[] preset;
    }
    preset = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFGammaPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFGammaPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(preset))
    {
        PARAMETER_DELETE[] preset;
    }
    preset = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFInputPresetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFInputPresetType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(preset))
    {
        PARAMETER_DELETE[] preset;
    }
    preset = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixBAFConfiguresType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFConfiguresType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(configure))
    {
        PARAMETER_DELETE[] configure;
    }
    configure = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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)
{
    if (__table != nullptr && __table->ReleaseDupObject(revision))
    {
        PARAMETER_DELETE[] revision;
    }
    revision = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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;
}

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

    if (PARAMETER_STRCMP(Type, moduleData->Type) == 0 && 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(GetName(moduleData->Type), 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 (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

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

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        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 & 0x00ffffff);

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

        if (result)
        {
            result = cls->Load(entry, alignment);
        }
        Modified++;
        Loaded = true;
    }

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixBAFTypeClass::UnloadModule()
{
    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
