| 34 | } |
| 35 | |
| 36 | void EnvironmentVariable::write(AbstractFile & os) { |
| 37 | /* pre processing */ |
| 38 | nameLength = static_cast<uint32_t>(name.size()); |
| 39 | dataLength = static_cast<uint32_t>(data.size()); |
| 40 | |
| 41 | ObjectHeader::write(os); |
| 42 | os.write(reinterpret_cast<char *>(&nameLength), sizeof(nameLength)); |
| 43 | os.write(reinterpret_cast<char *>(&dataLength), sizeof(dataLength)); |
| 44 | os.write(reinterpret_cast<char *>(&reservedEnvironmentVariable), sizeof(reservedEnvironmentVariable)); |
| 45 | os.write(const_cast<char *>(name.data()), nameLength); |
| 46 | os.write(reinterpret_cast<char *>(data.data()), dataLength); |
| 47 | |
| 48 | /* skip padding */ |
| 49 | os.skipp(objectSize % 4); |
| 50 | } |
| 51 | |
| 52 | uint32_t EnvironmentVariable::calculateObjectSize() const { |
| 53 | return |