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

#include "aecmetering.h"
#include "parametersetmanager.h"

AECMETERING_NAMESPACE_BEGIN

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

    return __result;
}

bool NonLinearEstimateType::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, "enableNonLinearEstimate") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableNonLinearEstimate = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "errPct") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            errPct = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxIterations") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxIterations = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

bool SuppressNonLinearZoneDataType::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, "outputGain") == 0)
    {
        ParameterUtils::DoubleToString((double)outputGain, __value, __size);
        __result = true;
    }

    return __result;
}

bool SuppressNonLinearZoneDataType::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, "outputGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            outputGain = (float)dblValue; 
        }
    }

    return __result;
}

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

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

    return __result;
}

bool SuppressNonLinearZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool SuppressNonLinearZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

bool AdvLuxTargetType::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, "nonLinLuxTgt") == 0)
    {
        __result = nonLinLuxTgt.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "enableForYOnly") == 0)
    {
        ParameterUtils::DoubleToString((double)enableForYOnly, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "suppressNonLinearLuma") == 0)
    {
        __result = suppressNonLinearLuma.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AdvLuxTargetType::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, "nonLinLuxTgt") == 0)
    {
        __result = nonLinLuxTgt.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "enableForYOnly") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableForYOnly = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "suppressNonLinearLuma") == 0)
    {
        __result = suppressNonLinearLuma.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool AdvancedTargetType::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, "advLuxTgt") == 0)
    {
        __result = advLuxTgt.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "advHistTgt") == 0)
    {
        __result = advHistTgt.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AdvancedTargetType::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, "advLuxTgt") == 0)
    {
        __result = advLuxTgt.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "advHistTgt") == 0)
    {
        __result = advHistTgt.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

bool DynamicEVLockType::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, "convDelayOffset") == 0)
    {
        ParameterUtils::DoubleToString((double)convDelayOffset, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SCConsTh") == 0)
    {
        ParameterUtils::DoubleToString((double)SCConsTh, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SCRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)SCRatio, __value, __size);
        __result = true;
    }

    return __result;
}

bool DynamicEVLockType::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, "convDelayOffset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            convDelayOffset = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SCConsTh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SCConsTh = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SCRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SCRatio = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool EVLumaTargetType::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, "stepsPerEV") == 0)
    {
        ParameterUtils::DoubleToString((double)stepsPerEV, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minEVValue") == 0)
    {
        ParameterUtils::DoubleToString((double)minEVValue, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxEVValue") == 0)
    {
        ParameterUtils::DoubleToString((double)maxEVValue, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "EVCompTable") == 0)
    {
        __result = EVCompTable.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicEVLock") == 0)
    {
        __result = dynamicEVLock.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool EVLumaTargetType::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, "stepsPerEV") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            stepsPerEV = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minEVValue") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minEVValue = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxEVValue") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxEVValue = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "EVCompTable") == 0)
    {
        __result = EVCompTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicEVLock") == 0)
    {
        __result = dynamicEVLock.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

bool EVLumaTargetType::EVCompTableStruct::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, "EVCompTableElements") == 0)
    {
        if (__index < 49)
        {
            ParameterUtils::DoubleToString((double)EVCompTableElements[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 49; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)EVCompTableElements[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

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

    return __result;
}

bool ExtrmClrLumaTargetZoneDataType::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, "channelAdjRatio") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)channelAdjRatio[__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)channelAdjRatio[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool ExtrmClrLumaTargetZoneDataType::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, "channelAdjRatio") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                channelAdjRatio[__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)
                {
                    channelAdjRatio[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

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

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

    return __result;
}

bool ExtrmClrLumaTargetZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool ExtrmClrLumaTargetZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

bool ExtrmClrThresRangeType::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, "thres") == 0)
    {
        ParameterUtils::DoubleToString((double)thres, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "interpPct") == 0)
    {
        ParameterUtils::DoubleToString((double)interpPct, __value, __size);
        __result = true;
    }

    return __result;
}

bool ExtrmClrThresRangeType::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, "thres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            thres = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "interpPct") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            interpPct = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool ExtrmClrLumaTargetType::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, "enableExtrmClr") == 0)
    {
        ParameterUtils::DoubleToString((double)enableExtrmClr, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "thresRed") == 0)
    {
        __result = thresRed.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresGreenR") == 0)
    {
        __result = thresGreenR.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresGreenB") == 0)
    {
        __result = thresGreenB.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresGreenCenter") == 0)
    {
        __result = thresGreenCenter.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresBlue") == 0)
    {
        __result = thresBlue.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresColorStatsPct") == 0)
    {
        __result = thresColorStatsPct.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresLumaLow") == 0)
    {
        ParameterUtils::DoubleToString((double)thresLumaLow, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "thresLumaHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)thresLumaHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "extrmClrLumaTargetZone") == 0)
    {
        if (__index < extrmClrLumaTargetZoneCount)
        {
            __result = extrmClrLumaTargetZone[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool ExtrmClrLumaTargetType::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, "enableExtrmClr") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableExtrmClr = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "thresRed") == 0)
    {
        __result = thresRed.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresGreenR") == 0)
    {
        __result = thresGreenR.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresGreenB") == 0)
    {
        __result = thresGreenB.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresGreenCenter") == 0)
    {
        __result = thresGreenCenter.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresBlue") == 0)
    {
        __result = thresBlue.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresColorStatsPct") == 0)
    {
        __result = thresColorStatsPct.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresLumaLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            thresLumaLow = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "thresLumaHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            thresLumaHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "extrmClrLumaTargetZone") == 0)
    {
        if (__index < extrmClrLumaTargetZoneCount)
        {
            __result = extrmClrLumaTargetZone[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool ADRCGainAdjustZoneDataType::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, "tolerance") == 0)
    {
        ParameterUtils::DoubleToString((double)tolerance, __value, __size);
        __result = true;
    }

    return __result;
}

bool ADRCGainAdjustZoneDataType::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, "tolerance") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            tolerance = (float)dblValue; 
        }
    }

    return __result;
}

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

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

    return __result;
}

bool ADRCGainAdjustZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool ADRCGainAdjustZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

bool SensorHDRGainAdjustType::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, "enableADRGGainAdjust") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableADRGGainAdjust = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ADRCGainAdjustZone") == 0)
    {
        if (__index < ADRCGainAdjustZoneCount)
        {
            __result = ADRCGainAdjustZone[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool HistLumaTargetZoneDataType::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, "minTargetAdjRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)minTargetAdjRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxTargetAdjRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)maxTargetAdjRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "satRefLow") == 0)
    {
        ParameterUtils::DoubleToString((double)satRefLow, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "satRefHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)satRefHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "darkRefLow") == 0)
    {
        ParameterUtils::DoubleToString((double)darkRefLow, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "darkRefHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)darkRefHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "histSatPushupRange") == 0)
    {
        if (__index < 3)
        {
            __result = histSatPushupRange[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "histSatPushdownRange") == 0)
    {
        if (__index < 3)
        {
            __result = histSatPushdownRange[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "histDarkRange") == 0)
    {
        if (__index < 3)
        {
            __result = histDarkRange[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxDRCGain") == 0)
    {
        ParameterUtils::DoubleToString((double)maxDRCGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxADRCGain") == 0)
    {
        ParameterUtils::DoubleToString((double)maxADRCGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxDarkBoostGain") == 0)
    {
        ParameterUtils::DoubleToString((double)maxDarkBoostGain, __value, __size);
        __result = true;
    }

    return __result;
}

bool HistLumaTargetZoneDataType::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, "minTargetAdjRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minTargetAdjRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxTargetAdjRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxTargetAdjRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "satRefLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            satRefLow = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "satRefHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            satRefHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "darkRefLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            darkRefLow = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "darkRefHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            darkRefHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "histSatPushupRange") == 0)
    {
        if (__index < 3)
        {
            __result = histSatPushupRange[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "histSatPushdownRange") == 0)
    {
        if (__index < 3)
        {
            __result = histSatPushdownRange[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "histDarkRange") == 0)
    {
        if (__index < 3)
        {
            __result = histDarkRange[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxDRCGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxDRCGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxADRCGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxADRCGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxDarkBoostGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxDarkBoostGain = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool HistLumaTargetZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool HistLumaTargetZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

bool HistLumaTargetType::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, "enableHistMetering") == 0)
    {
        ParameterUtils::DoubleToString((double)enableHistMetering, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableADRC") == 0)
    {
        ParameterUtils::DoubleToString((double)enableADRC, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableNonLinearTargetEstimate") == 0)
    {
        ParameterUtils::DoubleToString((double)enableNonLinearTargetEstimate, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableDarkBoost") == 0)
    {
        ParameterUtils::DoubleToString((double)enableDarkBoost, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableAntiBandingPrioOverADRC") == 0)
    {
        ParameterUtils::DoubleToString((double)enableAntiBandingPrioOverADRC, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "antiBandingPrioTriggerRange") == 0)
    {
        ParameterUtils::DoubleToString((double)antiBandingPrioTriggerRange, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "targetFilterFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)targetFilterFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "histLumaTargetZone") == 0)
    {
        if (__index < histLumaTargetZoneCount)
        {
            __result = histLumaTargetZone[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableWBClipping") == 0)
    {
        ParameterUtils::DoubleToString((double)enableWBClipping, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableBinGrouping") == 0)
    {
        ParameterUtils::DoubleToString((double)enableBinGrouping, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "EVHandling") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)EVHandling, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SensorHDRGainAdjust") == 0)
    {
        __result = SensorHDRGainAdjust.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool HistLumaTargetType::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, "enableHistMetering") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableHistMetering = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableADRC") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableADRC = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableNonLinearTargetEstimate") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableNonLinearTargetEstimate = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableDarkBoost") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableDarkBoost = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableAntiBandingPrioOverADRC") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableAntiBandingPrioOverADRC = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "antiBandingPrioTriggerRange") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            antiBandingPrioTriggerRange = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "targetFilterFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            targetFilterFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "histLumaTargetZone") == 0)
    {
        if (__index < histLumaTargetZoneCount)
        {
            __result = histLumaTargetZone[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableWBClipping") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableWBClipping = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableBinGrouping") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableBinGrouping = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "EVHandling") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            EVHandling = (aecglobalelements::HistogramTargetEVMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SensorHDRGainAdjust") == 0)
    {
        __result = SensorHDRGainAdjust.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool AECLumaTargetType::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, "luxLumaTarget") == 0)
    {
        __result = luxLumaTarget.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "histLumaTarget") == 0)
    {
        __result = histLumaTarget.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "extrmClrLumaTarget") == 0)
    {
        __result = extrmClrLumaTarget.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "EVLumaTarget") == 0)
    {
        __result = EVLumaTarget.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "advancedTarget") == 0)
    {
        __result = advancedTarget.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECLumaTargetType::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, "luxLumaTarget") == 0)
    {
        __result = luxLumaTarget.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "histLumaTarget") == 0)
    {
        __result = histLumaTarget.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "extrmClrLumaTarget") == 0)
    {
        __result = extrmClrLumaTarget.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "EVLumaTarget") == 0)
    {
        __result = EVLumaTarget.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "advancedTarget") == 0)
    {
        __result = advancedTarget.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

bool RgnAdjZoneDataType::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, "thresBrightRgn") == 0)
    {
        __result = thresBrightRgn.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresDarkRgn") == 0)
    {
        __result = thresDarkRgn.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "weightBrightRgnAdj") == 0)
    {
        ParameterUtils::DoubleToString((double)weightBrightRgnAdj, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "weightDarkRgnAdj") == 0)
    {
        ParameterUtils::DoubleToString((double)weightDarkRgnAdj, __value, __size);
        __result = true;
    }

    return __result;
}

bool RgnAdjZoneDataType::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, "thresBrightRgn") == 0)
    {
        __result = thresBrightRgn.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresDarkRgn") == 0)
    {
        __result = thresDarkRgn.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "weightBrightRgnAdj") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weightBrightRgnAdj = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "weightDarkRgnAdj") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weightDarkRgnAdj = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

bool RgnAdjZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool RgnAdjZoneType::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, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

bool RgnAdjType::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, "enableBrightRgnAdj") == 0)
    {
        ParameterUtils::DoubleToString((double)enableBrightRgnAdj, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableDarkRgnAdj") == 0)
    {
        ParameterUtils::DoubleToString((double)enableDarkRgnAdj, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minTableWeightForBright") == 0)
    {
        ParameterUtils::DoubleToString((double)minTableWeightForBright, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxStatsPctForBright") == 0)
    {
        ParameterUtils::DoubleToString((double)maxStatsPctForBright, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minTableWeightForDark") == 0)
    {
        ParameterUtils::DoubleToString((double)minTableWeightForDark, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxStatsPctForDark") == 0)
    {
        ParameterUtils::DoubleToString((double)maxStatsPctForDark, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "rgnAdjZone") == 0)
    {
        if (__index < rgnAdjZoneCount)
        {
            __result = rgnAdjZone[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool RgnAdjType::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, "enableBrightRgnAdj") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableBrightRgnAdj = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableDarkRgnAdj") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableDarkRgnAdj = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minTableWeightForBright") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minTableWeightForBright = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxStatsPctForBright") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxStatsPctForBright = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minTableWeightForDark") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minTableWeightForDark = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxStatsPctForDark") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxStatsPctForDark = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "rgnAdjZone") == 0)
    {
        if (__index < rgnAdjZoneCount)
        {
            __result = rgnAdjZone[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

    return __result;
}

bool MtrTableType::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, "centerWeighted") == 0)
    {
        __result = centerWeighted.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "spotWeighted") == 0)
    {
        __result = spotWeighted.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool MtrTableType::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, "centerWeighted") == 0)
    {
        __result = centerWeighted.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "spotWeighted") == 0)
    {
        __result = spotWeighted.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

bool MtrTableType::centerWeightedStruct::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, "weights") == 0)
    {
        if (__index < 256)
        {
            ParameterUtils::DoubleToString((double)weights[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 256; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)weights[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

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

    return __result;
}

bool MtrTableType::spotWeightedStruct::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, "weights") == 0)
    {
        if (__index < 256)
        {
            ParameterUtils::DoubleToString((double)weights[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 256; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)weights[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

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

    return __result;
}

bool LumaWeightType::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, "weight") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)weight[__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)weight[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableColorAndSensorComp") == 0)
    {
        ParameterUtils::DoubleToString((double)enableColorAndSensorComp, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "refGain") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)refGain[__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)refGain[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool LumaWeightType::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, "weight") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                weight[__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)
                {
                    weight[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableColorAndSensorComp") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableColorAndSensorComp = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "refGain") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                refGain[__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)
                {
                    refGain[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool IndexCalcType::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, "enableLuxIndexComp") == 0)
    {
        ParameterUtils::DoubleToString((double)enableLuxIndexComp, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "refSensitivityForExpIndexZero") == 0)
    {
        ParameterUtils::DoubleToString((double)refSensitivityForExpIndexZero, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexFilterFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)luxIndexFilterFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "bayerGridSubsmplSelect") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)bayerGridSubsmplSelect, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool IndexCalcType::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, "enableLuxIndexComp") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableLuxIndexComp = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "refSensitivityForExpIndexZero") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            refSensitivityForExpIndexZero = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexFilterFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            luxIndexFilterFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "bayerGridSubsmplSelect") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bayerGridSubsmplSelect = (aecglobalelements::AECBayerGridSubsmplType)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

bool AECLumaCalcType::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, "indexCalc") == 0)
    {
        __result = indexCalc.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "lumaWeight") == 0)
    {
        __result = lumaWeight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "mtrTables") == 0)
    {
        __result = mtrTables.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "lumaRgnAdj") == 0)
    {
        __result = lumaRgnAdj.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECLumaCalcType::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, "indexCalc") == 0)
    {
        __result = indexCalc.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "lumaWeight") == 0)
    {
        __result = lumaWeight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "mtrTables") == 0)
    {
        __result = mtrTables.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "lumaRgnAdj") == 0)
    {
        __result = lumaRgnAdj.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

bool AECCoreMeteringType::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, "mtrLumaCalc") == 0)
    {
        __result = mtrLumaCalc.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "mtrLumaTarget") == 0)
    {
        __result = mtrLumaTarget.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECCoreMeteringType::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, "mtrLumaCalc") == 0)
    {
        __result = mtrLumaCalc.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "mtrLumaTarget") == 0)
    {
        __result = mtrLumaTarget.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECCoreMeteringTypeClass::AECCoreMeteringTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(mtrLumaCalc);
    PARAMETER_INITIALIZE(mtrLumaTarget);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECCoreMeteringTypeClass::AECCoreMeteringTypeClass(
    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(mtrLumaCalc);
    PARAMETER_INITIALIZE(mtrLumaTarget);
}

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

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

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

    PARAMETER_INITIALIZE(enableNonLinearEstimate);
    PARAMETER_INITIALIZE(errPct);
    PARAMETER_INITIALIZE(maxIterations);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableNonLinearEstimate, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, errPct, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxIterations, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(nonLinHistTgt);

    result = nonLinHistTgt.Load(entry, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(outputGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, outputGain, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(suppressNonLinearZone);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(nonLinLuxTgt);
    PARAMETER_INITIALIZE(enableForYOnly);
    PARAMETER_INITIALIZE(suppressNonLinearLuma);

    result = nonLinLuxTgt.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableForYOnly, alignment)
    if (result)
    {
        result = suppressNonLinearLuma.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(advLuxTgt);
    PARAMETER_INITIALIZE(advHistTgt);

    result = advLuxTgt.Load(entry, alignment);
    if (result)
    {
        result = advHistTgt.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(convDelayOffset);
    PARAMETER_INITIALIZE(SCConsTh);
    PARAMETER_INITIALIZE(SCRatio);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, convDelayOffset, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SCConsTh, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SCRatio, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(stepsPerEV);
    PARAMETER_INITIALIZE(minEVValue);
    PARAMETER_INITIALIZE(maxEVValue);
    PARAMETER_INITIALIZE(EVCompTable);
    PARAMETER_INITIALIZE(dynamicEVLock);

    SYMBOL_TABLE_ENTRY_READ(entry, result, stepsPerEV, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minEVValue, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxEVValue, alignment)
    if (result)
    {
        result = EVCompTable.Load(entry, alignment);
    }
    if (result)
    {
        result = dynamicEVLock.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(EVCompTableElements);

    result = entry->ReadArray(EVCompTableElements, 49, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(channelAdjRatio);

    result = entry->ReadArray(channelAdjRatio, 3, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(thres);
    PARAMETER_INITIALIZE(interpPct);

    SYMBOL_TABLE_ENTRY_READ(entry, result, thres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, interpPct, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enableExtrmClr);
    PARAMETER_INITIALIZE(thresRed);
    PARAMETER_INITIALIZE(thresGreenR);
    PARAMETER_INITIALIZE(thresGreenB);
    PARAMETER_INITIALIZE(thresGreenCenter);
    PARAMETER_INITIALIZE(thresBlue);
    PARAMETER_INITIALIZE(thresColorStatsPct);
    PARAMETER_INITIALIZE(thresLumaLow);
    PARAMETER_INITIALIZE(thresLumaHigh);
    PARAMETER_INITIALIZE(extrmClrLumaTargetZone);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableExtrmClr, alignment)
    if (result)
    {
        result = thresRed.Load(entry, alignment);
    }
    if (result)
    {
        result = thresGreenR.Load(entry, alignment);
    }
    if (result)
    {
        result = thresGreenB.Load(entry, alignment);
    }
    if (result)
    {
        result = thresGreenCenter.Load(entry, alignment);
    }
    if (result)
    {
        result = thresBlue.Load(entry, alignment);
    }
    if (result)
    {
        result = thresColorStatsPct.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, thresLumaLow, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, thresLumaHigh, alignment)

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(tolerance);

    SYMBOL_TABLE_ENTRY_READ(entry, result, tolerance, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableADRGGainAdjust);
    PARAMETER_INITIALIZE(ADRCGainAdjustZone);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableADRGGainAdjust, alignment)

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(minTargetAdjRatio);
    PARAMETER_INITIALIZE(maxTargetAdjRatio);
    PARAMETER_INITIALIZE(satRefLow);
    PARAMETER_INITIALIZE(satRefHigh);
    PARAMETER_INITIALIZE(darkRefLow);
    PARAMETER_INITIALIZE(darkRefHigh);
    PARAMETER_INITIALIZE(histSatPushupRange);
    PARAMETER_INITIALIZE(histSatPushdownRange);
    PARAMETER_INITIALIZE(histDarkRange);
    PARAMETER_INITIALIZE(maxDRCGain);
    PARAMETER_INITIALIZE(maxADRCGain);
    PARAMETER_INITIALIZE(maxDarkBoostGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, minTargetAdjRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxTargetAdjRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, satRefLow, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, satRefHigh, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, darkRefLow, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, darkRefHigh, alignment)
    for (UINT32 i = 0; result && i < 3; i++)
    {
        if (result)
        {
            result = histSatPushupRange[i].Load(entry, alignment);
        }
    }
    for (UINT32 i = 0; result && i < 3; i++)
    {
        if (result)
        {
            result = histSatPushdownRange[i].Load(entry, alignment);
        }
    }
    for (UINT32 i = 0; result && i < 3; i++)
    {
        if (result)
        {
            result = histDarkRange[i].Load(entry, alignment);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxDRCGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxADRCGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxDarkBoostGain, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableHistMetering);
    PARAMETER_INITIALIZE(enableADRC);
    PARAMETER_INITIALIZE(enableNonLinearTargetEstimate);
    PARAMETER_INITIALIZE(enableDarkBoost);
    PARAMETER_INITIALIZE(enableAntiBandingPrioOverADRC);
    PARAMETER_INITIALIZE(antiBandingPrioTriggerRange);
    PARAMETER_INITIALIZE(targetFilterFactor);
    PARAMETER_INITIALIZE(histLumaTargetZone);
    PARAMETER_INITIALIZE(enableWBClipping);
    PARAMETER_INITIALIZE(enableBinGrouping);
    PARAMETER_INITIALIZE(EVHandling);
    PARAMETER_INITIALIZE(SensorHDRGainAdjust);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableHistMetering, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableADRC, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableNonLinearTargetEstimate, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableDarkBoost, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableAntiBandingPrioOverADRC, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, antiBandingPrioTriggerRange, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, targetFilterFactor, alignment)

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

            if (histLumaTargetZone == nullptr)
            {
                if (result && histLumaTargetZoneCount > 0)
                {
                    histLumaTargetZone = PARAMETER_NEW HistLumaTargetZoneType[histLumaTargetZoneCount];
                    (void)pointerEntry->SetDupObject(histLumaTargetZone, histLumaTargetZoneCount, file, line);
                }
                if (!result || histLumaTargetZone == nullptr)
                {
                    if (histLumaTargetZoneCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate histLumaTargetZone\n");
                    }
                    histLumaTargetZoneCount = 0;
                }
                for (UINT32 i = 0; result && i < histLumaTargetZoneCount; i++)
                {
                    result = histLumaTargetZone[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (histLumaTargetZone == nullptr)
        {
            histLumaTargetZoneCount = 0;
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableWBClipping, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableBinGrouping, alignment)
    if (result)
    {
        result = aecglobalelements::ReadEnum_HistogramTargetEVMethodType(entry, EVHandling, alignment);
    }
    if (result)
    {
        result = SensorHDRGainAdjust.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(luxLumaTarget);
    PARAMETER_INITIALIZE(histLumaTarget);
    PARAMETER_INITIALIZE(extrmClrLumaTarget);
    PARAMETER_INITIALIZE(EVLumaTarget);
    PARAMETER_INITIALIZE(advancedTarget);

    result = luxLumaTarget.Load(entry, alignment);
    if (result)
    {
        result = histLumaTarget.Load(entry, alignment);
    }
    if (result)
    {
        result = extrmClrLumaTarget.Load(entry, alignment);
    }
    if (result)
    {
        result = EVLumaTarget.Load(entry, alignment);
    }
    if (result)
    {
        result = advancedTarget.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(thresBrightRgn);
    PARAMETER_INITIALIZE(thresDarkRgn);
    PARAMETER_INITIALIZE(weightBrightRgnAdj);
    PARAMETER_INITIALIZE(weightDarkRgnAdj);

    result = thresBrightRgn.Load(entry, alignment);
    if (result)
    {
        result = thresDarkRgn.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, weightBrightRgnAdj, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, weightDarkRgnAdj, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableBrightRgnAdj);
    PARAMETER_INITIALIZE(enableDarkRgnAdj);
    PARAMETER_INITIALIZE(minTableWeightForBright);
    PARAMETER_INITIALIZE(maxStatsPctForBright);
    PARAMETER_INITIALIZE(minTableWeightForDark);
    PARAMETER_INITIALIZE(maxStatsPctForDark);
    PARAMETER_INITIALIZE(rgnAdjZone);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableBrightRgnAdj, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableDarkRgnAdj, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minTableWeightForBright, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxStatsPctForBright, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minTableWeightForDark, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxStatsPctForDark, alignment)

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(centerWeighted);
    PARAMETER_INITIALIZE(spotWeighted);

    result = centerWeighted.Load(entry, alignment);
    if (result)
    {
        result = spotWeighted.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(weights);

    result = entry->ReadArray(weights, 256, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(weights);

    result = entry->ReadArray(weights, 256, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(weight);
    PARAMETER_INITIALIZE(enableColorAndSensorComp);
    PARAMETER_INITIALIZE(refGain);

    result = entry->ReadArray(weight, 3, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableColorAndSensorComp, alignment)
    if (result)
    {
        result = entry->ReadArray(refGain, 3, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableLuxIndexComp);
    PARAMETER_INITIALIZE(refSensitivityForExpIndexZero);
    PARAMETER_INITIALIZE(luxIndexFilterFactor);
    PARAMETER_INITIALIZE(bayerGridSubsmplSelect);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableLuxIndexComp, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, refSensitivityForExpIndexZero, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, luxIndexFilterFactor, alignment)
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECBayerGridSubsmplType(entry, bayerGridSubsmplSelect, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(indexCalc);
    PARAMETER_INITIALIZE(lumaWeight);
    PARAMETER_INITIALIZE(mtrTables);
    PARAMETER_INITIALIZE(lumaRgnAdj);

    result = indexCalc.Load(entry, alignment);
    if (result)
    {
        result = lumaWeight.Load(entry, alignment);
    }
    if (result)
    {
        result = mtrTables.Load(entry, alignment);
    }
    if (result)
    {
        result = lumaRgnAdj.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(mtrLumaCalc);
    PARAMETER_INITIALIZE(mtrLumaTarget);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = mtrLumaCalc.Load(entry, alignment);
    }
    if (result)
    {
        result = mtrLumaTarget.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECCoreMeteringType::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 AECCoreMeteringType::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 SuppressNonLinearType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SuppressNonLinearType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(suppressNonLinearZone))
    {
        PARAMETER_DELETE[] suppressNonLinearZone;
    }
    suppressNonLinearZone = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AdvLuxTargetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AdvLuxTargetType::Unload(ParameterFileSymbolTable* const __table)
{
    suppressNonLinearLuma.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AdvancedTargetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AdvancedTargetType::Unload(ParameterFileSymbolTable* const __table)
{
    advLuxTgt.Unload(__table);
}

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECLumaTargetType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECLumaTargetType::Unload(ParameterFileSymbolTable* const __table)
{
    luxLumaTarget.Unload(__table);
    histLumaTarget.Unload(__table);
    extrmClrLumaTarget.Unload(__table);
    advancedTarget.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECLumaCalcType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECLumaCalcType::Unload(ParameterFileSymbolTable* const __table)
{
    lumaRgnAdj.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECCoreMeteringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECCoreMeteringType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    mtrLumaCalc.Unload(__table);
    mtrLumaTarget.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECCoreMeteringType::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 AECCoreMeteringType::Release()
{
    ((AECCoreMeteringTypeClass*)this)->Release();
}

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

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

    return (ParameterModule*)cls;
}

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

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

AECMETERING_NAMESPACE_END
