diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/io/stream_reader.h | 1 | ||||
| -rw-r--r-- | include/tag.h | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/io/stream_reader.h b/include/io/stream_reader.h index 07eb36192d..056d14e9dd 100644 --- a/include/io/stream_reader.h +++ b/include/io/stream_reader.h @@ -23,6 +23,7 @@ #include "endian_str.h" #include "tag.h" #include <iosfwd> +#include <memory> #include <stdexcept> namespace nbt diff --git a/include/tag.h b/include/tag.h index ae84891c76..4b547e013c 100644 --- a/include/tag.h +++ b/include/tag.h @@ -51,6 +51,10 @@ enum class tag_type : int8_t */ bool is_valid_type(int type, bool allow_end = false); +//Forward declaration +namespace io +{ class stream_reader; } + ///Base class for all NBT tag classes class tag { @@ -72,6 +76,9 @@ public: */ virtual tag& assign(tag&& rhs) = 0; + ///Reads the tag's payload from the stream + virtual void read_payload(io::stream_reader& reader) = 0; + /** * @brief Default-constructs a new tag of the given type * @throw std::invalid_argument if the type is not valid (e.g. End or Null) |
