65 {
66 sio::block_list blocks{};
67 blocks.push_back(m_runMetaData);
68
70
71 blocks.clear();
72 blocks.push_back(m_collectionMetaData);
73 m_tocRecord.
addRecord(m_collectionMetaData->name(),
75
76 blocks.clear();
77 auto tocRecordBlock = std::make_shared<SIOFileTOCRecordBlock>();
78 tocRecordBlock->record = &m_tocRecord;
79 blocks.push_back(tocRecordBlock);
80
82
83
84
85 uint64_t finalWords = (((uint64_t)sio_helpers::SIOTocMarker) << 32) | ((uint64_t)tocStartPos & 0xffffffff);
86 m_stream.write(reinterpret_cast<char*>(&finalWords), sizeof(finalWords));
87
88 m_stream.close();
89}
void addRecord(const std::string &name, PositionType startPos)
sio::ifstream::pos_type writeRecord(const sio::block_list &blocks, const std::string &recordName, sio::ofstream &stream, std::size_t initBufferSize=sio::mbyte, bool compress=true)
Write the passed record and return where it starts in the file.