2018-06-06 12:38:42 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2018-10-14 05:45:09 +00:00
|
|
|
#include <fnd/IByteModel.h>
|
2018-08-07 07:17:51 +00:00
|
|
|
#include <nn/es/ticket.h>
|
2018-06-06 12:38:42 +00:00
|
|
|
|
2018-08-07 07:17:51 +00:00
|
|
|
namespace nn
|
|
|
|
{
|
2018-06-06 12:38:42 +00:00
|
|
|
namespace es
|
|
|
|
{
|
|
|
|
class SectionHeader_V2 :
|
2018-10-14 05:45:09 +00:00
|
|
|
public fnd::IByteModel
|
2018-06-06 12:38:42 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SectionHeader_V2();
|
|
|
|
SectionHeader_V2(const SectionHeader_V2& other);
|
|
|
|
|
2018-06-24 05:20:56 +00:00
|
|
|
void operator=(const SectionHeader_V2& other);
|
2018-06-06 12:38:42 +00:00
|
|
|
bool operator==(const SectionHeader_V2& other) const;
|
|
|
|
bool operator!=(const SectionHeader_V2& other) const;
|
|
|
|
|
2018-10-18 12:49:13 +00:00
|
|
|
// IByteModel
|
2018-06-24 04:46:11 +00:00
|
|
|
void toBytes();
|
|
|
|
void fromBytes(const byte_t* data, size_t len);
|
|
|
|
const fnd::Vec<byte_t>& getBytes() const;
|
2018-06-06 12:38:42 +00:00
|
|
|
|
|
|
|
// variables
|
|
|
|
virtual void clear();
|
|
|
|
|
|
|
|
uint32_t getSectionOffset() const;
|
|
|
|
void setSectionOffset(uint32_t offset);
|
|
|
|
|
|
|
|
uint32_t getRecordSize() const;
|
|
|
|
void setRecordSize(uint32_t size);
|
|
|
|
|
|
|
|
uint32_t getSectionSize() const;
|
|
|
|
void getSectionSize(uint32_t size);
|
|
|
|
|
|
|
|
uint16_t getRecordNum() const;
|
|
|
|
void setRecordNum(uint16_t record_num);
|
|
|
|
|
|
|
|
ticket::SectionType getSectionType() const;
|
|
|
|
void setSectionType(ticket::SectionType type);
|
|
|
|
|
|
|
|
private:
|
|
|
|
const std::string kModuleName = "SECTION_HEADER_V2";
|
|
|
|
|
|
|
|
// raw binary
|
2018-06-24 04:46:11 +00:00
|
|
|
fnd::Vec<byte_t> mRawBinary;
|
2018-06-06 12:38:42 +00:00
|
|
|
|
|
|
|
// variables
|
|
|
|
uint32_t mSectionOffset;
|
|
|
|
uint32_t mRecordSize;
|
|
|
|
uint32_t mSectionSize;
|
|
|
|
uint16_t mRecordNum;
|
|
|
|
ticket::SectionType mSectionType;
|
|
|
|
};
|
|
|
|
}
|
2018-08-07 07:17:51 +00:00
|
|
|
}
|