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

#include "aecxmeteringsceneanalyzer.h"
#include "parametersetmanager.h"

AECXMETERINGSCENEANALYZER_NAMESPACE_BEGIN

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

bool TargetCalculationUnitTriggerSystemType::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, "trigger1DataBank") == 0)
    {
        __result = trigger1DataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "trigger2DataBank") == 0)
    {
        __result = trigger2DataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool TargetCalculationUnitTriggerSystemType::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, "trigger1DataBank") == 0)
    {
        __result = trigger1DataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "trigger2DataBank") == 0)
    {
        __result = trigger2DataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool ArithmeticOperationOperandInputType::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, "method") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)method, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "tuningValue") == 0)
    {
        ParameterUtils::DoubleToString((double)tuningValue, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "dataBank") == 0)
    {
        __result = dataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "triggerSystem") == 0)
    {
        __result = triggerSystem.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "dataType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)dataType, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool ArithmeticOperationOperandInputType::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, "method") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            method = (ArithmeticInputMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "tuningValue") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            tuningValue = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataBank") == 0)
    {
        __result = dataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerSystem") == 0)
    {
        __result = triggerSystem.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "dataType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataType = (BankDataType)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

bool OutputDataBankType::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, "dataBank") == 0)
    {
        __result = dataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "dataType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)dataType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        PARAMETER_STRCPY(__value, __size, description);
        __result = true;
    }

    return __result;
}

bool OutputDataBankType::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, "dataBank") == 0)
    {
        __result = dataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "dataType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataType = (BankDataType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool ArithmeticOperatorType::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, "enableFlag") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFlag, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "operatorPriority") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)operatorPriority, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "operationMethod") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)operationMethod, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "operandA") == 0)
    {
        __result = operandA.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "operandB") == 0)
    {
        __result = operandB.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "operandC") == 0)
    {
        __result = operandC.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "operandD") == 0)
    {
        __result = operandD.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "output") == 0)
    {
        __result = output.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "opID") == 0)
    {
        ParameterUtils::DoubleToString((double)opID, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool ArithmeticOperatorType::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, "enableFlag") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFlag = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "operatorPriority") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            operatorPriority = (ArithmeticOperationPriorityType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "operationMethod") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            operationMethod = (ArithmeticOperationMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "operandA") == 0)
    {
        __result = operandA.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "operandB") == 0)
    {
        __result = operandB.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "operandC") == 0)
    {
        __result = operandC.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "operandD") == 0)
    {
        __result = operandD.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "output") == 0)
    {
        __result = output.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "opID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            opID = (UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool TargetCalculationUnitType::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, "selection") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            selection = (CalculationMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataBank") == 0)
    {
        __result = dataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerSystem") == 0)
    {
        __result = triggerSystem.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool CalculationUnitTriggerSystemType::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, "trigger1DataBank") == 0)
    {
        __result = trigger1DataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "trigger2DataBank") == 0)
    {
        __result = trigger2DataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool CalculationUnitTriggerSystemType::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, "trigger1DataBank") == 0)
    {
        __result = trigger1DataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "trigger2DataBank") == 0)
    {
        __result = trigger2DataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

bool CalculationUnitType::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, "selection") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            selection = (CalculationMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataBank") == 0)
    {
        __result = dataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerSystem") == 0)
    {
        __result = triggerSystem.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

bool ComponentAggregatorType::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, "method") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            method = (AggregationMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "output") == 0)
    {
        __result = output.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

bool SceneAnalyzerType::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, "analyzerID") == 0)
    {
        ParameterUtils::DoubleToString((double)analyzerID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        PARAMETER_STRCPY(__value, __size, description);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "analyzerName") == 0)
    {
        PARAMETER_STRCPY(__value, __size, analyzerName);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)exposureType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "refExposureType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)refExposureType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "luma") == 0)
    {
        __result = luma.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "target") == 0)
    {
        __result = target.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "confidence") == 0)
    {
        __result = confidence.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "arithmeticOperators") == 0)
    {
        if (__index < arithmeticOperatorsCount)
        {
            __result = arithmeticOperators[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "reservedParameter") == 0)
    {
        if (__index < reservedParameterCount)
        {
            ParameterUtils::DoubleToString((double)reservedParameter[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < reservedParameterCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)reservedParameter[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool SceneAnalyzerType::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, "analyzerID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            analyzerID = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "analyzerName") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exposureType = (aecxglobalelements::AECXExposureSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "refExposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            refExposureType = (aecxglobalelements::AECXExposureSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "luma") == 0)
    {
        __result = luma.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "target") == 0)
    {
        __result = target.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "confidence") == 0)
    {
        __result = confidence.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "arithmeticOperators") == 0)
    {
        if (__index < arithmeticOperatorsCount)
        {
            __result = arithmeticOperators[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "reservedParameter") == 0)
    {
        if (__index < reservedParameterCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                reservedParameter[__index] = (UINT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ArithmeticInputMethodType::TuningMethod):
            enumValue = ArithmeticInputMethodType::TuningMethod;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticInputMethodType::DataBankMethod):
            enumValue = ArithmeticInputMethodType::DataBankMethod;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticInputMethodType::TriggerSystemMethod):
            enumValue = ArithmeticInputMethodType::TriggerSystemMethod;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ArithmeticInputMethodType", uintValue);
            break;
        }
    }
    return result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(BankDataType::startEnd):
            enumValue = BankDataType::startEnd;
            result    = true;
            break;
        case static_cast<UINT32>(BankDataType::start):
            enumValue = BankDataType::start;
            result    = true;
            break;
        case static_cast<UINT32>(BankDataType::end):
            enumValue = BankDataType::end;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to BankDataType", uintValue);
            break;
        }
    }
    return result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ArithmeticOperationMethodType::Addition):
            enumValue = ArithmeticOperationMethodType::Addition;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Subtraction):
            enumValue = ArithmeticOperationMethodType::Subtraction;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Multiplication):
            enumValue = ArithmeticOperationMethodType::Multiplication;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Division):
            enumValue = ArithmeticOperationMethodType::Division;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Max):
            enumValue = ArithmeticOperationMethodType::Max;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Min):
            enumValue = ArithmeticOperationMethodType::Min;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Smallest):
            enumValue = ArithmeticOperationMethodType::Smallest;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::SecondSmallest):
            enumValue = ArithmeticOperationMethodType::SecondSmallest;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Largest):
            enumValue = ArithmeticOperationMethodType::Largest;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::SecondLargest):
            enumValue = ArithmeticOperationMethodType::SecondLargest;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::FlashHighLuma):
            enumValue = ArithmeticOperationMethodType::FlashHighLuma;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::LinearInterpolation):
            enumValue = ArithmeticOperationMethodType::LinearInterpolation;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::CondLarger):
            enumValue = ArithmeticOperationMethodType::CondLarger;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::CondSmaller):
            enumValue = ArithmeticOperationMethodType::CondSmaller;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::CondEqual):
            enumValue = ArithmeticOperationMethodType::CondEqual;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::Sqrt):
            enumValue = ArithmeticOperationMethodType::Sqrt;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation01):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation01;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation02):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation02;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation03):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation03;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation04):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation04;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation05):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation05;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation06):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation06;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation07):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation07;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation08):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation08;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation09):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation09;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationMethodType::AdvancedOperation10):
            enumValue = ArithmeticOperationMethodType::AdvancedOperation10;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ArithmeticOperationMethodType", uintValue);
            break;
        }
    }
    return result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ArithmeticOperationPriorityType::BeginningOfAnalysis):
            enumValue = ArithmeticOperationPriorityType::BeginningOfAnalysis;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationPriorityType::EndOfAnalysis):
            enumValue = ArithmeticOperationPriorityType::EndOfAnalysis;
            result    = true;
            break;
        case static_cast<UINT32>(ArithmeticOperationPriorityType::AdjustmentRatio):
            enumValue = ArithmeticOperationPriorityType::AdjustmentRatio;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ArithmeticOperationPriorityType", uintValue);
            break;
        }
    }
    return result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(CalculationMethodType::DataBankMethod):
            enumValue = CalculationMethodType::DataBankMethod;
            result    = true;
            break;
        case static_cast<UINT32>(CalculationMethodType::TriggerSystemMethod):
            enumValue = CalculationMethodType::TriggerSystemMethod;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to CalculationMethodType", uintValue);
            break;
        }
    }
    return result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(AggregationMethodType::Average):
            enumValue = AggregationMethodType::Average;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::NormalizedWeightedSum):
            enumValue = AggregationMethodType::NormalizedWeightedSum;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::WeightedSum):
            enumValue = AggregationMethodType::WeightedSum;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::MinValue):
            enumValue = AggregationMethodType::MinValue;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::MaxValue):
            enumValue = AggregationMethodType::MaxValue;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::MinWeight):
            enumValue = AggregationMethodType::MinWeight;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::MaxWeight):
            enumValue = AggregationMethodType::MaxWeight;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::MultiplyValue):
            enumValue = AggregationMethodType::MultiplyValue;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::RatioValue):
            enumValue = AggregationMethodType::RatioValue;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::FirstValidConfidence):
            enumValue = AggregationMethodType::FirstValidConfidence;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::Dominant):
            enumValue = AggregationMethodType::Dominant;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::MinWeightedAbsoluteSumDifference):
            enumValue = AggregationMethodType::MinWeightedAbsoluteSumDifference;
            result    = true;
            break;
        case static_cast<UINT32>(AggregationMethodType::RangeIntersection):
            enumValue = AggregationMethodType::RangeIntersection;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to AggregationMethodType", uintValue);
            break;
        }
    }
    return result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXMeteringSceneAnalyzerTypeClass::AECXMeteringSceneAnalyzerTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(luxAnalyzer);
    PARAMETER_INITIALIZE(analyzersCount);
    PARAMETER_INITIALIZE(analyzers);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXMeteringSceneAnalyzerTypeClass::AECXMeteringSceneAnalyzerTypeClass(
    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(luxAnalyzer);
    PARAMETER_INITIALIZE(analyzers);
}

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

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

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

    PARAMETER_INITIALIZE(rangeStart);
    PARAMETER_INITIALIZE(rangeEnd);

    SYMBOL_TABLE_ENTRY_READ(entry, result, rangeStart, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, rangeEnd, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(trigger);
    PARAMETER_INITIALIZE(triggerData);

    result = trigger.Load(entry, alignment);
    if (result)
    {
        result = triggerData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(trigger);
    PARAMETER_INITIALIZE(trigger2Data);

    result = trigger.Load(entry, alignment);

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(trigger1DataBank);
    PARAMETER_INITIALIZE(trigger2DataBank);
    PARAMETER_INITIALIZE(trigger1Data);

    result = trigger1DataBank.Load(entry, alignment);
    if (result)
    {
        result = trigger2DataBank.Load(entry, alignment);
    }

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(method);
    PARAMETER_INITIALIZE(tuningValue);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(triggerSystem);
    PARAMETER_INITIALIZE(dataType);

    result = aecxmeteringsceneanalyzer::ReadEnum_ArithmeticInputMethodType(entry, method, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, tuningValue, alignment)
    if (result)
    {
        result = dataBank.Load(entry, alignment);
    }
    if (result)
    {
        result = triggerSystem.Load(entry, alignment);
    }
    if (result)
    {
        result = aecxmeteringsceneanalyzer::ReadEnum_BankDataType(entry, dataType, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(dataType);
    PARAMETER_INITIALIZE(description);

    result = dataBank.Load(entry, alignment);
    if (result)
    {
        result = aecxmeteringsceneanalyzer::ReadEnum_BankDataType(entry, dataType, alignment);
    }

    // Reading String description 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, description, count, alignment)
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableFlag);
    PARAMETER_INITIALIZE(operatorPriority);
    PARAMETER_INITIALIZE(operationMethod);
    PARAMETER_INITIALIZE(operandA);
    PARAMETER_INITIALIZE(operandB);
    PARAMETER_INITIALIZE(operandC);
    PARAMETER_INITIALIZE(operandD);
    PARAMETER_INITIALIZE(output);
    PARAMETER_INITIALIZE(opID);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFlag, alignment)
    if (result)
    {
        result = aecxmeteringsceneanalyzer::ReadEnum_ArithmeticOperationPriorityType(entry, operatorPriority, alignment);
    }
    if (result)
    {
        result = aecxmeteringsceneanalyzer::ReadEnum_ArithmeticOperationMethodType(entry, operationMethod, alignment);
    }
    if (result)
    {
        result = operandA.Load(entry, alignment);
    }
    if (result)
    {
        result = operandB.Load(entry, alignment);
    }
    if (result)
    {
        result = operandC.Load(entry, alignment);
    }
    if (result)
    {
        result = operandD.Load(entry, alignment);
    }
    if (result)
    {
        result = output.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, opID, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(selection);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(triggerSystem);

    result = aecxmeteringsceneanalyzer::ReadEnum_CalculationMethodType(entry, selection, alignment);
    if (result)
    {
        result = dataBank.Load(entry, alignment);
    }
    if (result)
    {
        result = triggerSystem.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(trigger1DataBank);
    PARAMETER_INITIALIZE(trigger2DataBank);
    PARAMETER_INITIALIZE(trigger1Data);

    result = trigger1DataBank.Load(entry, alignment);
    if (result)
    {
        result = trigger2DataBank.Load(entry, alignment);
    }

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(selection);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(triggerSystem);

    result = aecxmeteringsceneanalyzer::ReadEnum_CalculationMethodType(entry, selection, alignment);
    if (result)
    {
        result = dataBank.Load(entry, alignment);
    }
    if (result)
    {
        result = triggerSystem.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(value);
    PARAMETER_INITIALIZE(weight);

    result = value.Load(entry, alignment);
    if (result)
    {
        result = weight.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(method);
    PARAMETER_INITIALIZE(output);

    result = aecxmeteringsceneanalyzer::ReadEnum_AggregationMethodType(entry, method, alignment);
    if (result)
    {
        result = output.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(calculators);
    PARAMETER_INITIALIZE(aggregator);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(value);
    PARAMETER_INITIALIZE(weight);

    result = value.Load(entry, alignment);
    if (result)
    {
        result = weight.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(calculators);
    PARAMETER_INITIALIZE(aggregator);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(analyzerID);
    PARAMETER_INITIALIZE(description);
    PARAMETER_INITIALIZE(analyzerName);
    PARAMETER_INITIALIZE(exposureType);
    PARAMETER_INITIALIZE(refExposureType);
    PARAMETER_INITIALIZE(luma);
    PARAMETER_INITIALIZE(target);
    PARAMETER_INITIALIZE(confidence);
    PARAMETER_INITIALIZE(arithmeticOperators);
    PARAMETER_INITIALIZE(reservedParameter);

    SYMBOL_TABLE_ENTRY_READ(entry, result, analyzerID, alignment)

    // Reading String description 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, description, count, alignment)
    }

    // Reading String analyzerName 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, analyzerName, count, alignment)
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXExposureSelection(entry, exposureType, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXExposureSelection(entry, refExposureType, alignment);
    }
    if (result)
    {
        result = luma.Load(entry, alignment);
    }
    if (result)
    {
        result = target.Load(entry, alignment);
    }
    if (result)
    {
        result = confidence.Load(entry, alignment);
    }

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

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

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

            if (reservedParameter == nullptr)
            {
                if (result && reservedParameterCount > 0)
                {
                    reservedParameter = pointerEntry->ReadArray<UINT32>(reservedParameterCount, alignment);
                    result = reservedParameter != nullptr;
                }
                if (!result || reservedParameter == nullptr)
                {
                    if (reservedParameterCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate reservedParameter\n");
                    }
                    reservedParameterCount = 0;
                }
            }
        }
        if (reservedParameter == nullptr)
        {
            reservedParameterCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(luxAnalyzer);
    PARAMETER_INITIALIZE(analyzers);

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

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

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

    return result;
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ArithmeticOperationOperandInputType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ArithmeticOperationOperandInputType::Unload(ParameterFileSymbolTable* const __table)
{
    triggerSystem.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ArithmeticOperatorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ArithmeticOperatorType::Unload(ParameterFileSymbolTable* const __table)
{
    operandA.Unload(__table);
    operandB.Unload(__table);
    operandC.Unload(__table);
    operandD.Unload(__table);
    output.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TargetCalculationUnitType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TargetCalculationUnitType::Unload(ParameterFileSymbolTable* const __table)
{
    triggerSystem.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload CalculationUnitType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CalculationUnitType::Unload(ParameterFileSymbolTable* const __table)
{
    triggerSystem.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TargetComponentCalculatorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TargetComponentCalculatorType::Unload(ParameterFileSymbolTable* const __table)
{
    value.Unload(__table);
    weight.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ComponentAggregatorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ComponentAggregatorType::Unload(ParameterFileSymbolTable* const __table)
{
    output.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload GeneralComponentCalculatorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void GeneralComponentCalculatorType::Unload(ParameterFileSymbolTable* const __table)
{
    value.Unload(__table);
    weight.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload SceneAnalyzerType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SceneAnalyzerType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(description))
    {
        PARAMETER_DELETE[] description;
    }
    description = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(analyzerName))
    {
        PARAMETER_DELETE[] analyzerName;
    }
    analyzerName = nullptr;
    luma.Unload(__table);
    target.Unload(__table);
    confidence.Unload(__table);
    for (UINT32 i = 0; i < arithmeticOperatorsCount; i++)
    {
        arithmeticOperators[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(arithmeticOperators))
    {
        PARAMETER_DELETE[] arithmeticOperators;
    }
    arithmeticOperators = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(reservedParameter))
    {
        PARAMETER_DELETE[] reservedParameter;
    }
    reservedParameter = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXMeteringSceneAnalyzerType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXMeteringSceneAnalyzerType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    luxAnalyzer.Unload(__table);
    for (UINT32 i = 0; i < analyzersCount; i++)
    {
        analyzers[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(analyzers))
    {
        PARAMETER_DELETE[] analyzers;
    }
    analyzers = nullptr;
}

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

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

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

    return (ParameterModule*)cls;
}

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

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

AECXMETERINGSCENEANALYZER_NAMESPACE_END
