aboutsummaryrefslogtreecommitdiff
path: root/core/src/Utils/IO/VectorIntegration.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-08-15 17:14:06 -0700
committerrtk0c <[email protected]>2021-08-15 17:14:06 -0700
commitc51a61c0f0de65a3e64f589816a56f21ed4e8528 (patch)
treeba1737b64d5307f9dedc934d9398297d3fb8ee82 /core/src/Utils/IO/VectorIntegration.hpp
parent64a6dbcfdb89a5f57d93d47a2be0c741dda4662d (diff)
Initial work on data streams
Diffstat (limited to 'core/src/Utils/IO/VectorIntegration.hpp')
-rw-r--r--core/src/Utils/IO/VectorIntegration.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/core/src/Utils/IO/VectorIntegration.hpp b/core/src/Utils/IO/VectorIntegration.hpp
new file mode 100644
index 0000000..b2c751c
--- /dev/null
+++ b/core/src/Utils/IO/VectorIntegration.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "Utils/IO/DataStream.hpp"
+
+#include <vector>
+
+template <class TElement>
+void ReadFromDataStream(DataStream& s, std::vecetor<TElement>& vec)
+{
+ s.Write((uint64_t)vec.size());
+ for (auto& element : vec) {
+ // TODO
+ }
+}
+
+template <class TElement>
+void WriteToDataStream(DataStream& s, const std::vecetor<TElement>& vec)
+{
+ uint64_t size;
+ s >> size;
+
+ vec.clear();
+ vec.reserve(size);
+
+ for (uint64_t i = 0; i < size; ++i) {
+ // TODO
+ }
+}