| 12 | } |
| 13 | |
| 14 | void TestStructure::read(AbstractFile & is) { |
| 15 | ObjectHeader::read(is); |
| 16 | is.read(reinterpret_cast<char *>(&executionObjectIdentify), sizeof(executionObjectIdentify)); |
| 17 | is.read(reinterpret_cast<char *>(&type), sizeof(type)); |
| 18 | is.read(reinterpret_cast<char *>(&reservedTestStructure), sizeof(reservedTestStructure)); |
| 19 | is.read(reinterpret_cast<char *>(&uniqueNo), sizeof(uniqueNo)); |
| 20 | is.read(reinterpret_cast<char *>(&action), sizeof(action)); |
| 21 | is.read(reinterpret_cast<char *>(&result), sizeof(result)); |
| 22 | is.read(reinterpret_cast<char *>(&executingObjectNameLength), sizeof(executingObjectNameLength)); |
| 23 | is.read(reinterpret_cast<char *>(&nameLength), sizeof(nameLength)); |
| 24 | is.read(reinterpret_cast<char *>(&textLength), sizeof(textLength)); |
| 25 | executingObjectName.resize(executingObjectNameLength); |
| 26 | is.read(const_cast<char *>(reinterpret_cast<const char *>(executingObjectName.data())), executingObjectNameLength * sizeof(char16_t)); |
| 27 | name.resize(nameLength); |
| 28 | is.read(const_cast<char *>(reinterpret_cast<const char *>(name.data())), nameLength * sizeof(char16_t)); |
| 29 | text.resize(textLength); |
| 30 | is.read(const_cast<char *>(reinterpret_cast<const char *>(text.data())), textLength * sizeof(char16_t)); |
| 31 | } |
| 32 | |
| 33 | void TestStructure::write(AbstractFile & os) { |
| 34 | /* pre processing */ |