diff options
Diffstat (limited to 'src/NBT/ListTag.hpp')
-rw-r--r-- | src/NBT/ListTag.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/NBT/ListTag.hpp b/src/NBT/ListTag.hpp index 757a0aa..833c41e 100644 --- a/src/NBT/ListTag.hpp +++ b/src/NBT/ListTag.hpp @@ -65,6 +65,20 @@ public: virtual Type getSubtype() const { return type; } + + virtual void print(std::ostream& os, const std::string &indent) const { + os << getSubtype() << " [" << std::endl; + + std::string inner = indent + " "; + + for (const auto &item : *this) { + os << inner; + item->print(os, inner); + os << std::endl; + } + + os << indent << "]"; + } }; } |