| 457 | } |
| 458 | |
| 459 | void CGenerator::setBinaryList(StructMember *structMember) |
| 460 | { |
| 461 | DataType *dataType = structMember->getDataType(); |
| 462 | if (dataType->isBinary()) |
| 463 | { |
| 464 | Annotation *listLength = findAnnotation(structMember, LENGTH_ANNOTATION); |
| 465 | if (listLength) |
| 466 | { |
| 467 | BuiltinType *builtinType = dynamic_cast<BuiltinType *>(m_globals->getSymbol("uint8")); |
| 468 | assert(builtinType); |
| 469 | ListType *listType = new ListType(builtinType); |
| 470 | structMember->setDataType(listType); |
| 471 | listType->setLengthVariableName(listLength->getValueObject()->toString()); |
| 472 | m_listBinaryTypes.push_back(listType); |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | void CGenerator::generate() |
| 478 | { |
nothing calls this directly
no test coverage detected