diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-05 13:50:30 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-05 13:50:30 +0200 |
| commit | 92dd084fdd7f44d7aba88424134d97e3eceb3b0f (patch) | |
| tree | 8c0740ff6d5bc0f28922bfa50f8fee7b43b69584 /include | |
| parent | 17c81269da417affccfbd16087d5a4d020712a90 (diff) | |
| download | Project-Tick-92dd084fdd7f44d7aba88424134d97e3eceb3b0f.tar.gz Project-Tick-92dd084fdd7f44d7aba88424134d97e3eceb3b0f.zip | |
Implement stream_reader::read_payload
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) |
