From 43842d2246731a1fab79d9326bd5bec8098505d1 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Wed, 5 Aug 2015 14:01:13 +0200 Subject: Implement read_payload for all tags --- include/tag_array.h | 2 ++ include/tag_compound.h | 2 ++ include/tag_list.h | 2 ++ include/tag_primitive.h | 2 ++ include/tag_string.h | 2 ++ 5 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/tag_array.h b/include/tag_array.h index 9a79489c56..5ce7dd366e 100644 --- a/include/tag_array.h +++ b/include/tag_array.h @@ -104,6 +104,8 @@ public: const_iterator cbegin() const; const_iterator cend() const; + void read_payload(io::stream_reader& reader) override; + private: std::vector data; }; diff --git a/include/tag_compound.h b/include/tag_compound.h index 8e09ff4834..60376d2446 100644 --- a/include/tag_compound.h +++ b/include/tag_compound.h @@ -117,6 +117,8 @@ public: const_iterator cbegin() const; const_iterator cend() const; + void read_payload(io::stream_reader& reader) override; + friend bool operator==(const tag_compound& lhs, const tag_compound& rhs); friend bool operator!=(const tag_compound& lhs, const tag_compound& rhs); diff --git a/include/tag_list.h b/include/tag_list.h index ac35b1d40d..324d2de6d8 100644 --- a/include/tag_list.h +++ b/include/tag_list.h @@ -158,6 +158,8 @@ public: const_iterator cbegin() const; const_iterator cend() const; + void read_payload(io::stream_reader& reader) override; + /** * @brief Equality comparison for lists * diff --git a/include/tag_primitive.h b/include/tag_primitive.h index ac41568920..b1bb9920c0 100644 --- a/include/tag_primitive.h +++ b/include/tag_primitive.h @@ -53,6 +53,8 @@ public: tag_primitive& operator=(T value); void set(T value); + void read_payload(io::stream_reader& reader) override; + private: T value; }; diff --git a/include/tag_string.h b/include/tag_string.h index 0cb057125f..2a8a3d3f4e 100644 --- a/include/tag_string.h +++ b/include/tag_string.h @@ -51,6 +51,8 @@ public: void set(const std::string& str); void set(std::string&& str); + void read_payload(io::stream_reader& reader) override; + private: std::string value; }; -- cgit 0.0.5-2-1-g0f52