AUTOSAR:检测模型中的二维数组
AUTOSAR: detect two dimensional array in model
如何检测 ImplementationDataTypeElement 是否是其中包含数组(甚至通过 typedef)的数组?
我可以通过检测类别是否为 "ARRAY" 来检测一维数组,但是如何获得进一步的 "definitions"?
如果 ImplementationDataType
的 category
ARRAY
拥有的 ImplementationDataTypeElement
又是 category
ARRAY
的 ImplementationDataTypeElement
那么你有一个明确的指示对于二维数组。
如果 ImplementationDataTypeElement
是 category
TYPE_REFERENCE
那么你必须查看通过 ImplementationDataTypeElement
引用的 ImplementationDataType
。swDataDefProps
.implementationDataType
.
如果引用的ImplementationDataType
是category
ARRAY
那么这也说明是二维数组的定义
如何检测 ImplementationDataTypeElement 是否是其中包含数组(甚至通过 typedef)的数组?
我可以通过检测类别是否为 "ARRAY" 来检测一维数组,但是如何获得进一步的 "definitions"?
如果 ImplementationDataType
的 category
ARRAY
拥有的 ImplementationDataTypeElement
又是 category
ARRAY
的 ImplementationDataTypeElement
那么你有一个明确的指示对于二维数组。
如果 ImplementationDataTypeElement
是 category
TYPE_REFERENCE
那么你必须查看通过 ImplementationDataTypeElement
引用的 ImplementationDataType
。swDataDefProps
.implementationDataType
.
如果引用的ImplementationDataType
是category
ARRAY
那么这也说明是二维数组的定义