summaryrefslogtreecommitdiffstats
path: root/source/NBT.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-07 23:09:55 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-07 23:09:55 +0100
commit7219e74c7ca47013fb5fe99707f38ae7417257af (patch)
treee3f459f1823679243cfac7a3ac94970a98eb5adf /source/NBT.h
parentChunkSender: Fixed a potential crash: removing a client means that no Send() is called on that client anymore (diff)
downloadcuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.tar
cuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.tar.gz
cuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.tar.bz2
cuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.tar.lz
cuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.tar.xz
cuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.tar.zst
cuberite-7219e74c7ca47013fb5fe99707f38ae7417257af.zip
Diffstat (limited to 'source/NBT.h')
-rw-r--r--source/NBT.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/NBT.h b/source/NBT.h
index 5bad0492c..a05e574de 100644
--- a/source/NBT.h
+++ b/source/NBT.h
@@ -62,8 +62,8 @@ public:
static cNBTTag * CreateTag(cNBTTag * a_Parent, eTagType a_Type, const AString & a_Name); // Creates a new instance of a tag specified by iType, uses the correct class
- virtual cNBTTag * FindChildByName(const AString & a_Name) {return NULL; }
- cNBTTag * FindChildByPath(const AString & a_Path);
+ virtual cNBTTag * FindChildByName(const AString & a_Name) const {return NULL; }
+ const cNBTTag * FindChildByPath(const AString & a_Path) const;
} ;
typedef cNBTTag cNBTTree;
@@ -118,7 +118,7 @@ public:
cNBTTag * GetChildByIdx (size_t a_Index);
const cNBTTags & GetChildren (void) const {return m_Children; }
size_t GetChildrenCount(void) const {return m_Children.size(); }
- virtual cNBTTag * FindChildByName (const AString & a_Name) override;
+ virtual cNBTTag * FindChildByName (const AString & a_Name) const override;
int SetChildrenType(eTagType a_Type); // Only valid when list empty
eTagType GetChildrenType(void) const {return m_ChildrenType; }
@@ -142,7 +142,7 @@ public:
cNBTTag * GetChildByIdx (size_t a_Index);
const cNBTTags & GetChildren (void) const {return m_Children; }
size_t GetChildrenCount(void) const {return m_Children.size(); }
- virtual cNBTTag * FindChildByName (const AString & a_Name) override;
+ virtual cNBTTag * FindChildByName (const AString & a_Name) const override;
} ;
@@ -199,3 +199,14 @@ public:
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Dumping the tree (DEBUG-only)
+
+#ifdef _DEBUG
+void DumpTree(const cNBTTree * a_Tree, int a_Level = 0);
+#endif // _DEBUG
+
+
+
+