mirror of
https://github.com/jakcron/nstool
synced 2024-12-27 07:01:20 +00:00
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
|
#pragma once
|
||
|
#include <string>
|
||
|
#include <fnd/memory_blob.h>
|
||
|
#include <fnd/List.h>
|
||
|
#include <nx/NpdmHeader.h>
|
||
|
#include <nx/AciBinary.h>
|
||
|
#include <nx/AcidBinary.h>
|
||
|
|
||
|
|
||
|
namespace nx
|
||
|
{
|
||
|
class NpdmBinary :
|
||
|
public NpdmHeader
|
||
|
{
|
||
|
public:
|
||
|
NpdmBinary();
|
||
|
NpdmBinary(const NpdmBinary& other);
|
||
|
NpdmBinary(const u8* bytes, size_t len);
|
||
|
|
||
|
bool operator==(const NpdmBinary& other) const;
|
||
|
bool operator!=(const NpdmBinary& other) const;
|
||
|
void operator=(const NpdmBinary& other);
|
||
|
|
||
|
// to be used after export
|
||
|
const u8* getBytes() const;
|
||
|
size_t getSize() const;
|
||
|
|
||
|
// export/import binary
|
||
|
void exportBinary();
|
||
|
void importBinary(const u8* bytes, size_t len);
|
||
|
|
||
|
// variables
|
||
|
void clear();
|
||
|
|
||
|
const AciBinary& getAci() const;
|
||
|
void setAci(const AciBinary& aci);
|
||
|
|
||
|
const AcidBinary& getAcid() const;
|
||
|
void setAcid(const AcidBinary& acid);
|
||
|
private:
|
||
|
const std::string kModuleName = "NPDM_BINARY";
|
||
|
|
||
|
// raw binary
|
||
|
fnd::MemoryBlob mBinaryBlob;
|
||
|
|
||
|
// variables
|
||
|
AciBinary mAci;
|
||
|
AcidBinary mAcid;
|
||
|
|
||
|
bool isEqual(const NpdmBinary& other) const;
|
||
|
void copyFrom(const NpdmBinary& other);
|
||
|
};
|
||
|
|
||
|
}
|