blob: c7243178e45266abb3be044144741a7f7a66f9b3 [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 Tyner135793a2021-10-27 09:18:41 -050037void PrivateHeader::setPlid(uint32_t plid)
38{
39 _plid = plid;
40}
41
Ben Tynerf5210bb2021-01-05 12:58:10 -060042} // namespace pel
43} // namespace attn