AUTOSAR:检测模型中的二维数组

AUTOSAR: detect two dimensional array in model

如何检测 ImplementationDataTypeElement 是否是其中包含数组(甚至通过 typedef)的数组?

我可以通过检测类别是否为 "ARRAY" 来检测一维数组,但是如何获得进一步的 "definitions"?

如果 ImplementationDataTypecategory ARRAY 拥有的 ImplementationDataTypeElement 又是 category ARRAYImplementationDataTypeElement 那么你有一个明确的指示对于二维数组。

如果 ImplementationDataTypeElementcategory TYPE_REFERENCE 那么你必须查看通过 ImplementationDataTypeElement 引用的 ImplementationDataTypeswDataDefProps.implementationDataType.

如果引用的ImplementationDataTypecategoryARRAY那么这也说明是二维数组的定义