1404 words = tagname.split("::") |
1404 words = tagname.split("::") |
1405 if words[0] == "D": |
1405 if words[0] == "D": |
1406 infos = {} |
1406 infos = {} |
1407 datatype = project.getdataType(words[1]) |
1407 datatype = project.getdataType(words[1]) |
1408 basetype_content = datatype.baseType.getcontent() |
1408 basetype_content = datatype.baseType.getcontent() |
1409 if basetype_content["value"] is None: |
1409 if basetype_content["value"] is None or basetype_content["name"] in ["string", "wstring"]: |
1410 infos["type"] = "Directly" |
1410 infos["type"] = "Directly" |
1411 infos["base_type"] = basetype_content["name"] |
1411 infos["base_type"] = basetype_content["name"].upper() |
1412 elif basetype_content["name"] == "derived": |
1412 elif basetype_content["name"] == "derived": |
1413 infos["type"] = "Directly" |
1413 infos["type"] = "Directly" |
1414 infos["base_type"] = basetype_content["value"].getname() |
1414 infos["base_type"] = basetype_content["value"].getname() |
1415 elif basetype_content["name"] in ["subrangeSigned", "subrangeUnsigned"]: |
1415 elif basetype_content["name"] in ["subrangeSigned", "subrangeUnsigned"]: |
1416 infos["type"] = "Subrange" |
1416 infos["type"] = "Subrange" |
1430 infos["type"] = "Array" |
1430 infos["type"] = "Array" |
1431 infos["dimensions"] = [] |
1431 infos["dimensions"] = [] |
1432 for dimension in basetype_content["value"].getdimension(): |
1432 for dimension in basetype_content["value"].getdimension(): |
1433 infos["dimensions"].append((dimension.getlower(), dimension.getupper())) |
1433 infos["dimensions"].append((dimension.getlower(), dimension.getupper())) |
1434 base_type = basetype_content["value"].baseType.getcontent() |
1434 base_type = basetype_content["value"].baseType.getcontent() |
1435 if base_type["value"] is None: |
1435 if base_type["value"] is None or element_type["name"] in ["string", "wstring"]: |
1436 infos["base_type"] = base_type["name"] |
1436 infos["base_type"] = base_type["name"].upper() |
1437 else: |
1437 else: |
1438 infos["base_type"] = base_type["value"].getname() |
1438 infos["base_type"] = base_type["value"].getname() |
1439 elif basetype_content["name"] == "struct": |
1439 elif basetype_content["name"] == "struct": |
1440 infos["type"] = "Structure" |
1440 infos["type"] = "Structure" |
1441 infos["elements"] = [] |
1441 infos["elements"] = [] |
1442 for element in basetype_content["value"].getvariable(): |
1442 for element in basetype_content["value"].getvariable(): |
1443 element_infos = {} |
1443 element_infos = {} |
1444 element_infos["Name"] = element.getname() |
1444 element_infos["Name"] = element.getname() |
1445 element_type = element.type.getcontent() |
1445 element_type = element.type.getcontent() |
1446 if element_type["value"] is None: |
1446 if element_type["value"] is None or element_type["name"] in ["string", "wstring"]: |
1447 element_infos["Type"] = element_type["name"] |
1447 element_infos["Type"] = element_type["name"].upper() |
1448 else: |
1448 else: |
1449 element_infos["Type"] = element_type["value"].getname() |
1449 element_infos["Type"] = element_type["value"].getname() |
1450 if element.initialValue is not None: |
1450 if element.initialValue is not None: |
1451 element_infos["Initial Value"] = str(element.initialValue.getvalue()) |
1451 element_infos["Initial Value"] = str(element.initialValue.getvalue()) |
1452 else: |
1452 else: |