////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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  aecshdr.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "aecshdr.h"
#include "parametersetmanager.h"

AECSHDR_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SHDRExposureKneeType::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, "gain") == 0)
    {
        ParameterUtils::DoubleToString((double)gain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expTime") == 0)
    {
        ParameterUtils::DoubleToString((double)expTime, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "incrementPriority") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)incrementPriority, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)expIndex, __value, __size);
        __result = true;
    }

    return __result;
}

bool SHDRExposureKneeType::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, "gain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expTime") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            expTime = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "incrementPriority") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            incrementPriority = (aecglobalelements::AECExpIncPrioType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            expIndex = (float)dblValue; 
        }
    }

    return __result;
}

bool SHDRExposureKneeType::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);

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

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

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

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

    return __result;
}

bool SHDRExposureTableType::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, "sensitivityCorrectionFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)sensitivityCorrectionFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expKneeEntries") == 0)
    {
        if (__index < expKneeEntriesCount)
        {
            __result = expKneeEntries[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "thresAntiBandingMinExpTimePct") == 0)
    {
        ParameterUtils::DoubleToString((double)thresAntiBandingMinExpTimePct, __value, __size);
        __result = true;
    }

    return __result;
}

bool SHDRExposureTableType::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, "sensitivityCorrectionFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            sensitivityCorrectionFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expKneeEntries") == 0)
    {
        if (__index < expKneeEntriesCount)
        {
            __result = expKneeEntries[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "thresAntiBandingMinExpTimePct") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            thresAntiBandingMinExpTimePct = (float)dblValue; 
        }
    }

    return __result;
}

bool SHDRExposureTableType::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);

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

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

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

    return __result;
}

bool ShdrMeteringType::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, "enableShdr") == 0)
    {
        ParameterUtils::DoubleToString((double)enableShdr, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "numExposure") == 0)
    {
        ParameterUtils::DoubleToString((double)numExposure, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "sHDRConvType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)sHDRConvType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFexpTables") == 0)
    {
        if (__index < SEFexpTablesCount)
        {
            __result = SEFexpTables[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFexpTables") == 0)
    {
        if (__index < LEFexpTablesCount)
        {
            __result = LEFexpTables[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "MEFexpTables") == 0)
    {
        if (__index < MEFexpTablesCount)
        {
            __result = MEFexpTables[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFHistRangeStart") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFHistRangeStart, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFHistRangeEnd") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFHistRangeEnd, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFHistRefTarget") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFHistRefTarget, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFConvSpeed") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFConvSpeed, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFMinIdxForSun") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFMinIdxForSun, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFSettleTolerance") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFSettleTolerance, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SEFSettleCntThres") == 0)
    {
        ParameterUtils::DoubleToString((double)SEFSettleCntThres, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "FlatSceneHandling") == 0)
    {
        ParameterUtils::DoubleToString((double)FlatSceneHandling, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "FlatAdjustStep") == 0)
    {
        ParameterUtils::DoubleToString((double)FlatAdjustStep, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "FlatAdjustMaxItr") == 0)
    {
        ParameterUtils::DoubleToString((double)FlatAdjustMaxItr, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LuxFinalTMTarget") == 0)
    {
        __result = LuxFinalTMTarget.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "ExpRatioCapHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)ExpRatioCapHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ExpRatioCapLow") == 0)
    {
        ParameterUtils::DoubleToString((double)ExpRatioCapLow, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LowLightSensitiviyFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)LowLightSensitiviyFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFConvSpeed") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFConvSpeed, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFSettleTolerance") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFSettleTolerance, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFSettleCntThres") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFSettleCntThres, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFIterStep") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFIterStep, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFIterLumaTolerance") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFIterLumaTolerance, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFIterMaxCnt") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFIterMaxCnt, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LEFMaxGain") == 0)
    {
        ParameterUtils::DoubleToString((double)LEFMaxGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "reserved") == 0)
    {
        if (__index < 10)
        {
            ParameterUtils::DoubleToString((double)reserved[__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)reserved[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool ShdrMeteringType::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, "enableShdr") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableShdr = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "numExposure") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            numExposure = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "sHDRConvType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            sHDRConvType = (aecglobalelements::AECAlgoSHDRConvType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFexpTables") == 0)
    {
        if (__index < SEFexpTablesCount)
        {
            __result = SEFexpTables[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFexpTables") == 0)
    {
        if (__index < LEFexpTablesCount)
        {
            __result = LEFexpTables[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "MEFexpTables") == 0)
    {
        if (__index < MEFexpTablesCount)
        {
            __result = MEFexpTables[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFHistRangeStart") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFHistRangeStart = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFHistRangeEnd") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFHistRangeEnd = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFHistRefTarget") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFHistRefTarget = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFConvSpeed") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFConvSpeed = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFMinIdxForSun") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFMinIdxForSun = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFSettleTolerance") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFSettleTolerance = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SEFSettleCntThres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SEFSettleCntThres = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "FlatSceneHandling") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FlatSceneHandling = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "FlatAdjustStep") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FlatAdjustStep = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "FlatAdjustMaxItr") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FlatAdjustMaxItr = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LuxFinalTMTarget") == 0)
    {
        __result = LuxFinalTMTarget.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "ExpRatioCapHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ExpRatioCapHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ExpRatioCapLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ExpRatioCapLow = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LowLightSensitiviyFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LowLightSensitiviyFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFConvSpeed") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFConvSpeed = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFSettleTolerance") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFSettleTolerance = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFSettleCntThres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFSettleCntThres = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFIterStep") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFIterStep = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFIterLumaTolerance") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFIterLumaTolerance = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFIterMaxCnt") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFIterMaxCnt = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LEFMaxGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LEFMaxGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "reserved") == 0)
    {
        if (__index < 10)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                reserved[__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)
                {
                    reserved[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool ShdrMeteringType::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);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool AECShdrType::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, "shdrMtr") == 0)
    {
        __result = shdrMtr.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECShdrType::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, "shdrMtr") == 0)
    {
        __result = shdrMtr.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool AECShdrType::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);
    }

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

    return __result;
}

bool AECShdrType::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 AECShdrType::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 AECShdrType::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;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECShdrTypeClass::AECShdrTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(shdrMtr);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECShdrTypeClass::AECShdrTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(shdrMtr);
}

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

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

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

    PARAMETER_INITIALIZE(gain);
    PARAMETER_INITIALIZE(expTime);
    PARAMETER_INITIALIZE(incrementPriority);
    PARAMETER_INITIALIZE(expIndex);

    SYMBOL_TABLE_ENTRY_READ(entry, result, gain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, expTime, alignment)
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECExpIncPrioType(entry, incrementPriority, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, expIndex, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(sensitivityCorrectionFactor);
    PARAMETER_INITIALIZE(expKneeEntries);
    PARAMETER_INITIALIZE(thresAntiBandingMinExpTimePct);

    SYMBOL_TABLE_ENTRY_READ(entry, result, sensitivityCorrectionFactor, alignment)

    // Reading Array expKneeEntries from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        expKneeEntriesCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, expKneeEntriesCount, 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)
        {
            expKneeEntriesID = pointerEntry->ID;
            DupObjInfo* expKneeEntriesDupInfo = pointerEntry->GetDupObject(expKneeEntriesCount, file, line);
            if (expKneeEntriesDupInfo != nullptr && expKneeEntriesDupInfo->Object != nullptr)
            {
                expKneeEntries = (SHDRExposureKneeType*)expKneeEntriesDupInfo->Object;
                if (expKneeEntries == nullptr)
                {
                    if (expKneeEntriesDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "expKneeEntries duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            expKneeEntriesDupInfo->File, expKneeEntriesDupInfo->Line, expKneeEntriesDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "expKneeEntries duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            expKneeEntriesDupInfo->Line, expKneeEntriesDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(enableShdr);
    PARAMETER_INITIALIZE(numExposure);
    PARAMETER_INITIALIZE(sHDRConvType);
    PARAMETER_INITIALIZE(SEFexpTables);
    PARAMETER_INITIALIZE(LEFexpTables);
    PARAMETER_INITIALIZE(MEFexpTables);
    PARAMETER_INITIALIZE(SEFHistRangeStart);
    PARAMETER_INITIALIZE(SEFHistRangeEnd);
    PARAMETER_INITIALIZE(SEFHistRefTarget);
    PARAMETER_INITIALIZE(SEFConvSpeed);
    PARAMETER_INITIALIZE(SEFMinIdxForSun);
    PARAMETER_INITIALIZE(SEFSettleTolerance);
    PARAMETER_INITIALIZE(SEFSettleCntThres);
    PARAMETER_INITIALIZE(FlatSceneHandling);
    PARAMETER_INITIALIZE(FlatAdjustStep);
    PARAMETER_INITIALIZE(FlatAdjustMaxItr);
    PARAMETER_INITIALIZE(LuxFinalTMTarget);
    PARAMETER_INITIALIZE(ExpRatioCapHigh);
    PARAMETER_INITIALIZE(ExpRatioCapLow);
    PARAMETER_INITIALIZE(LowLightSensitiviyFactor);
    PARAMETER_INITIALIZE(LEFConvSpeed);
    PARAMETER_INITIALIZE(LEFSettleTolerance);
    PARAMETER_INITIALIZE(LEFSettleCntThres);
    PARAMETER_INITIALIZE(LEFIterStep);
    PARAMETER_INITIALIZE(LEFIterLumaTolerance);
    PARAMETER_INITIALIZE(LEFIterMaxCnt);
    PARAMETER_INITIALIZE(LEFMaxGain);
    PARAMETER_INITIALIZE(reserved);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableShdr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, numExposure, alignment)
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECAlgoSHDRConvType(entry, sHDRConvType, alignment);
    }

    // Reading Array SEFexpTables from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        SEFexpTablesCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, SEFexpTablesCount, 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)
        {
            SEFexpTablesID = pointerEntry->ID;
            DupObjInfo* SEFexpTablesDupInfo = pointerEntry->GetDupObject(SEFexpTablesCount, file, line);
            if (SEFexpTablesDupInfo != nullptr && SEFexpTablesDupInfo->Object != nullptr)
            {
                SEFexpTables = (SHDRExposureTableType*)SEFexpTablesDupInfo->Object;
                if (SEFexpTables == nullptr)
                {
                    if (SEFexpTablesDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "SEFexpTables duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            SEFexpTablesDupInfo->File, SEFexpTablesDupInfo->Line, SEFexpTablesDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "SEFexpTables duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            SEFexpTablesDupInfo->Line, SEFexpTablesDupInfo->RefCount);
                    }
                }
            }

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

    // Reading Array LEFexpTables from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        LEFexpTablesCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, LEFexpTablesCount, 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)
        {
            LEFexpTablesID = pointerEntry->ID;
            DupObjInfo* LEFexpTablesDupInfo = pointerEntry->GetDupObject(LEFexpTablesCount, file, line);
            if (LEFexpTablesDupInfo != nullptr && LEFexpTablesDupInfo->Object != nullptr)
            {
                LEFexpTables = (SHDRExposureTableType*)LEFexpTablesDupInfo->Object;
                if (LEFexpTables == nullptr)
                {
                    if (LEFexpTablesDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "LEFexpTables duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            LEFexpTablesDupInfo->File, LEFexpTablesDupInfo->Line, LEFexpTablesDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "LEFexpTables duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            LEFexpTablesDupInfo->Line, LEFexpTablesDupInfo->RefCount);
                    }
                }
            }

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

    // Reading Array MEFexpTables from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        MEFexpTablesCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, MEFexpTablesCount, 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)
        {
            MEFexpTablesID = pointerEntry->ID;
            DupObjInfo* MEFexpTablesDupInfo = pointerEntry->GetDupObject(MEFexpTablesCount, file, line);
            if (MEFexpTablesDupInfo != nullptr && MEFexpTablesDupInfo->Object != nullptr)
            {
                MEFexpTables = (SHDRExposureTableType*)MEFexpTablesDupInfo->Object;
                if (MEFexpTables == nullptr)
                {
                    if (MEFexpTablesDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "MEFexpTables duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            MEFexpTablesDupInfo->File, MEFexpTablesDupInfo->Line, MEFexpTablesDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "MEFexpTables duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            MEFexpTablesDupInfo->Line, MEFexpTablesDupInfo->RefCount);
                    }
                }
            }

            if (MEFexpTables == nullptr)
            {
                if (result && MEFexpTablesCount > 0)
                {
                    MEFexpTables = PARAMETER_NEW SHDRExposureTableType[MEFexpTablesCount];
                    (void)pointerEntry->SetDupObject(MEFexpTables, MEFexpTablesCount, file, line);
                }
                if (!result || MEFexpTables == nullptr)
                {
                    if (MEFexpTablesCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate MEFexpTables\n");
                    }
                    MEFexpTablesCount = 0;
                }
                for (UINT32 i = 0; result && i < MEFexpTablesCount; i++)
                {
                    result = MEFexpTables[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (MEFexpTables == nullptr)
        {
            MEFexpTablesCount = 0;
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFHistRangeStart, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFHistRangeEnd, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFHistRefTarget, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFConvSpeed, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFMinIdxForSun, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFSettleTolerance, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEFSettleCntThres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, FlatSceneHandling, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, FlatAdjustStep, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, FlatAdjustMaxItr, alignment)
    if (result)
    {
        result = LuxFinalTMTarget.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, ExpRatioCapHigh, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ExpRatioCapLow, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LowLightSensitiviyFactor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFConvSpeed, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFSettleTolerance, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFSettleCntThres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFIterStep, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFIterLumaTolerance, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFIterMaxCnt, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEFMaxGain, alignment)
    if (result)
    {
        result = entry->ReadArray(reserved, 10, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(shdrMtr);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = shdrMtr.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECShdrType::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;
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ShdrMeteringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ShdrMeteringType::Unload(ParameterFileSymbolTable* const __table)
{
    for (UINT32 i = 0; i < SEFexpTablesCount; i++)
    {
        SEFexpTables[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(SEFexpTables))
    {
        PARAMETER_DELETE[] SEFexpTables;
    }
    SEFexpTables = nullptr;
    for (UINT32 i = 0; i < LEFexpTablesCount; i++)
    {
        LEFexpTables[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(LEFexpTables))
    {
        PARAMETER_DELETE[] LEFexpTables;
    }
    LEFexpTables = nullptr;
    for (UINT32 i = 0; i < MEFexpTablesCount; i++)
    {
        MEFexpTables[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(MEFexpTables))
    {
        PARAMETER_DELETE[] MEFexpTables;
    }
    MEFexpTables = nullptr;
    LuxFinalTMTarget.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECShdrType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECShdrType::Unload(ParameterFileSymbolTable* const __table)
{
    shdrMtr.Unload(__table);
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* AECShdrTypeClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    AECShdrTypeClass* 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 = (AECShdrTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW AECShdrTypeClass(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 AECShdrTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AECShdrTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

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

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        AECShdrTypeClass* 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, "AECShdrTypeClass::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 AECShdrTypeClass::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 AECShdrTypeClass::Release()
{
    ParameterModule::Release();
}

AECSHDR_NAMESPACE_END
