diff options
Diffstat (limited to '')
-rw-r--r-- | source/NBT.h | 19 |
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
+
+
+
+
|