NE Alpha 34

This commit is contained in:
Cr4sh 2016-10-27 23:31:15 +07:00
parent cb430456bf
commit 52c7a56f68
18 changed files with 731 additions and 854 deletions

View file

@ -24,9 +24,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
class TreeItem
{
public:
TreeItem(const UINT8 type, const UINT8 subtype, const UString &name, const UString &text, const UString &info,
TreeItem(const UINT32 offset, const UINT8 type, const UINT8 subtype, const UString &name, const UString &text, const UString &info,
const UByteArray & header, const UByteArray & body, const UByteArray & tail,
const bool fixed, const bool compressed, const UByteArray & parsingData,
const bool fixed, const bool compressed,
TreeItem *parent = 0);
~TreeItem(); // Non-trivial implementation in CPP file
@ -45,8 +45,8 @@ public:
TreeItem *parent() { return parentItem; }
// Getters and setters for item parameters
UString name() const { return itemName; }
void setName(const UString &text) { itemName = text; }
UINT32 offset() const { return itemOffset; }
void setOffset(const UINT32 offset) { itemOffset = offset; }
UINT8 type() const { return itemType; }
void setType(const UINT8 type) { itemType = type; }
@ -54,6 +54,9 @@ public:
UINT8 subtype() const { return itemSubtype; }
void setSubtype(const UINT8 subtype) { itemSubtype = subtype; }
UString name() const { return itemName; }
void setName(const UString &text) { itemName = text; }
UString text() const { return itemText; }
void setText(const UString &text) { itemText = text; }
@ -66,10 +69,6 @@ public:
UByteArray tail() const { return itemTail; };
bool hasEmptyTail() const { return itemTail.isEmpty(); }
UByteArray parsingData() const { return itemParsingData; }
bool hasEmptyParsingData() const { return itemParsingData.isEmpty(); }
void setParsingData(const UByteArray & data) { itemParsingData = data; }
UString info() const { return itemInfo; }
void addInfo(const UString &info, const bool append) { if (append) itemInfo += info; else itemInfo = info + itemInfo; }
void setInfo(const UString &info) { itemInfo = info; }
@ -83,8 +82,13 @@ public:
bool compressed() const { return itemCompressed; }
void setCompressed(const bool compressed) { itemCompressed = compressed; }
UByteArray parsingData() const { return itemParsingData; };
bool hasEmptyParsingData() const { return itemParsingData.isEmpty(); }
void setParsingData(const UByteArray & pdata) { itemParsingData = pdata; }
private:
std::list<TreeItem*> childItems;
UINT32 itemOffset;
UINT8 itemAction;
UINT8 itemType;
UINT8 itemSubtype;
@ -94,9 +98,9 @@ private:
UByteArray itemHeader;
UByteArray itemBody;
UByteArray itemTail;
UByteArray itemParsingData;
bool itemFixed;
bool itemCompressed;
UByteArray itemParsingData;
TreeItem* parentItem;
};