nstool/lib/libnx/include/nx/AciBinary.h

60 lines
1.2 KiB
C
Raw Normal View History

2017-07-15 08:28:41 +00:00
#pragma once
#include <string>
#include <fnd/MemoryBlob.h>
2017-07-15 08:28:41 +00:00
#include <fnd/List.h>
#include <nx/AciHeader.h>
#include <nx/FacBinary.h>
#include <nx/SacBinary.h>
#include <nx/KcBinary.h>
namespace nx
{
class AciBinary :
public AciHeader
{
public:
AciBinary();
AciBinary(const AciBinary& other);
2018-03-22 05:26:22 +00:00
AciBinary(const byte_t* bytes, size_t len);
2017-07-15 08:28:41 +00:00
bool operator==(const AciBinary& other) const;
bool operator!=(const AciBinary& other) const;
void operator=(const AciBinary& other);
// to be used after export
2018-03-22 05:26:22 +00:00
const byte_t* getBytes() const;
2017-07-15 08:28:41 +00:00
size_t getSize() const;
// export/import binary
virtual void exportBinary();
2018-03-22 05:26:22 +00:00
virtual void importBinary(const byte_t* bytes, size_t len);
2017-07-15 08:28:41 +00:00
// variables
virtual void clear();
const FacBinary& getFac() const;
void setFac(const FacBinary& fac);
const SacBinary& getSac() const;
void setSac(const SacBinary& sac);
const KcBinary& getKc() const;
void setKc(const KcBinary& kc);
private:
const std::string kModuleName = "ACI_BINARY";
// raw binary
fnd::MemoryBlob mBinaryBlob;
// variables
FacBinary mFac;
SacBinary mSac;
KcBinary mKc;
bool isEqual(const AciBinary& other) const;
void copyFrom(const AciBinary& other);
};
}