nstool/lib/libes/include/nn/es/SectionHeader_V2.h

58 lines
1.3 KiB
C
Raw Permalink Normal View History

2018-10-27 07:06:33 +00:00
#pragma once
#include <string>
#include <fnd/IByteModel.h>
#include <nn/es/ticket.h>
namespace nn
{
namespace es
{
class SectionHeader_V2 :
public fnd::IByteModel
{
public:
SectionHeader_V2();
SectionHeader_V2(const SectionHeader_V2& other);
void operator=(const SectionHeader_V2& other);
bool operator==(const SectionHeader_V2& other) const;
bool operator!=(const SectionHeader_V2& other) const;
// IByteModel
void toBytes();
void fromBytes(const byte_t* data, size_t len);
const fnd::Vec<byte_t>& getBytes() const;
// 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
fnd::Vec<byte_t> mRawBinary;
// variables
uint32_t mSectionOffset;
uint32_t mRecordSize;
uint32_t mSectionSize;
uint16_t mRecordNum;
ticket::SectionType mSectionType;
};
}
2018-08-07 07:17:51 +00:00
}