blob: a6105949f17d17d36131d9fe99e6c4b1c6d60898 [file] [log] [blame]
Ben Tynerf5210bb2021-01-05 12:58:10 -06001#include "private_header.hpp"
2
3namespace attn
4{
5namespace pel
6{
7
8PrivateHeader::PrivateHeader(Stream& pel)
9{
10 unflatten(pel);
11}
12
13void PrivateHeader::flatten(Stream& stream) const
14{
15 stream << _header << _createTimestamp << _commitTimestamp << _creatorID
16 << _reservedByte1 << _reservedByte2 << _sectionCount << _obmcLogID
17 << _creatorVersion << _plid << _id;
18}
19
20void PrivateHeader::unflatten(Stream& stream)
21{
22 stream >> _header >> _createTimestamp >> _commitTimestamp >> _creatorID >>
23 _reservedByte1 >> _reservedByte2 >> _sectionCount >> _obmcLogID >>
24 _creatorVersion >> _plid >> _id;
25}
26
27uint8_t PrivateHeader::getSectionCount()
28{
29 return _sectionCount;
30}
31
32void PrivateHeader::setSectionCount(uint8_t sectionCount)
33{
34 _sectionCount = sectionCount;
35}
36
Ben Tynerf5210bb2021-01-05 12:58:10 -060037} // namespace pel
38} // namespace attn