5 #include <iolink/Matrix.h>
6 #include <iolink/Vector.h>
7 #include <iolink/VectorX.h>
8 #include <iolink/storage/StreamAccess.h>
9 #include <iolink/view/DataFrameView.h>
10 #include <iolink/view/ImageView.h>
38 static void encodeImageView(std::shared_ptr<ImageView> image, std::shared_ptr<StreamAccess> outStream);
52 static std::shared_ptr<ImageView> decodeImageView(std::shared_ptr<StreamAccess> inStream);
63 static void encodeArrayXi8(
const ArrayXi8& src, std::shared_ptr<StreamAccess> dst);
68 static void encodeArrayXi16(
const ArrayXi16& src, std::shared_ptr<StreamAccess> dst);
73 static void encodeArrayXi32(
const ArrayXi32& src, std::shared_ptr<StreamAccess> dst);
78 static void encodeArrayXi64(
const ArrayXi64& src, std::shared_ptr<StreamAccess> dst);
83 static void encodeArrayXu8(
const ArrayXu8& src, std::shared_ptr<StreamAccess> dst);
88 static void encodeArrayXu16(
const ArrayXu16& src, std::shared_ptr<StreamAccess> dst);
93 static void encodeArrayXu32(
const ArrayXu32& src, std::shared_ptr<StreamAccess> dst);
98 static void encodeArrayXu64(
const ArrayXu64& src, std::shared_ptr<StreamAccess> dst);
103 static void encodeArrayXf(
const ArrayXf& src, std::shared_ptr<StreamAccess> dst);
108 static void encodeArrayXd(
const ArrayXd& src, std::shared_ptr<StreamAccess> dst);
117 static ArrayXi8 decodeArrayXi8(std::shared_ptr<StreamAccess> src);
122 static ArrayXi16 decodeArrayXi16(std::shared_ptr<StreamAccess> src);
127 static ArrayXi32 decodeArrayXi32(std::shared_ptr<StreamAccess> src);
132 static ArrayXi64 decodeArrayXi64(std::shared_ptr<StreamAccess> src);
137 static ArrayXu8 decodeArrayXu8(std::shared_ptr<StreamAccess> src);
142 static ArrayXu16 decodeArrayXu16(std::shared_ptr<StreamAccess> src);
147 static ArrayXu32 decodeArrayXu32(std::shared_ptr<StreamAccess> src);
152 static ArrayXu64 decodeArrayXu64(std::shared_ptr<StreamAccess> src);
157 static ArrayXf decodeArrayXf(std::shared_ptr<StreamAccess> src);
162 static ArrayXd decodeArrayXd(std::shared_ptr<StreamAccess> src);
175 static void encodeVector2u8(
const Vector2u8& vect, std::shared_ptr<StreamAccess> outStream);
177 static void encodeVector2u16(
const Vector2u16& vect, std::shared_ptr<StreamAccess> outStream);
179 static void encodeVector2u32(
const Vector2u32& vect, std::shared_ptr<StreamAccess> outStream);
181 static void encodeVector2u64(
const Vector2u64& vect, std::shared_ptr<StreamAccess> outStream);
183 static void encodeVector2i8(
const Vector2i8& vect, std::shared_ptr<StreamAccess> outStream);
185 static void encodeVector2i16(
const Vector2i16& vect, std::shared_ptr<StreamAccess> outStream);
187 static void encodeVector2i32(
const Vector2i32& vect, std::shared_ptr<StreamAccess> outStream);
189 static void encodeVector2i64(
const Vector2i64& vect, std::shared_ptr<StreamAccess> outStream);
191 static void encodeVector2f(
const Vector2f& vect, std::shared_ptr<StreamAccess> outStream);
193 static void encodeVector2d(
const Vector2d& vect, std::shared_ptr<StreamAccess> outStream);
207 static Vector2u8 decodeVector2u8(std::shared_ptr<StreamAccess> inStream);
209 static Vector2u16 decodeVector2u16(std::shared_ptr<StreamAccess> inStream);
211 static Vector2u32 decodeVector2u32(std::shared_ptr<StreamAccess> inStream);
213 static Vector2u64 decodeVector2u64(std::shared_ptr<StreamAccess> inStream);
215 static Vector2i8 decodeVector2i8(std::shared_ptr<StreamAccess> inStream);
217 static Vector2i16 decodeVector2i16(std::shared_ptr<StreamAccess> inStream);
219 static Vector2i32 decodeVector2i32(std::shared_ptr<StreamAccess> inStream);
221 static Vector2i64 decodeVector2i64(std::shared_ptr<StreamAccess> inStream);
223 static Vector2f decodeVector2f(std::shared_ptr<StreamAccess> inStream);
225 static Vector2d decodeVector2d(std::shared_ptr<StreamAccess> inStream);
237 static void encodeVector3u8(
const Vector3u8& vect, std::shared_ptr<StreamAccess> outStream);
239 static void encodeVector3u16(
const Vector3u16& vect, std::shared_ptr<StreamAccess> outStream);
241 static void encodeVector3u32(
const Vector3u32& vect, std::shared_ptr<StreamAccess> outStream);
243 static void encodeVector3u64(
const Vector3u64& vect, std::shared_ptr<StreamAccess> outStream);
245 static void encodeVector3i8(
const Vector3i8& vect, std::shared_ptr<StreamAccess> outStream);
247 static void encodeVector3i16(
const Vector3i16& vect, std::shared_ptr<StreamAccess> outStream);
249 static void encodeVector3i32(
const Vector3i32& vect, std::shared_ptr<StreamAccess> outStream);
251 static void encodeVector3i64(
const Vector3i64& vect, std::shared_ptr<StreamAccess> outStream);
253 static void encodeVector3f(
const Vector3f& vect, std::shared_ptr<StreamAccess> outStream);
255 static void encodeVector3d(
const Vector3d& vect, std::shared_ptr<StreamAccess> outStream);
269 static Vector3u8 decodeVector3u8(std::shared_ptr<StreamAccess> inStream);
271 static Vector3u16 decodeVector3u16(std::shared_ptr<StreamAccess> inStream);
273 static Vector3u32 decodeVector3u32(std::shared_ptr<StreamAccess> inStream);
275 static Vector3u64 decodeVector3u64(std::shared_ptr<StreamAccess> inStream);
277 static Vector3i8 decodeVector3i8(std::shared_ptr<StreamAccess> inStream);
279 static Vector3i16 decodeVector3i16(std::shared_ptr<StreamAccess> inStream);
281 static Vector3i32 decodeVector3i32(std::shared_ptr<StreamAccess> inStream);
283 static Vector3i64 decodeVector3i64(std::shared_ptr<StreamAccess> inStream);
285 static Vector3f decodeVector3f(std::shared_ptr<StreamAccess> inStream);
287 static Vector3d decodeVector3d(std::shared_ptr<StreamAccess> inStream);
299 static void encodeVector4u8(
const Vector4u8& vect, std::shared_ptr<StreamAccess> outStream);
301 static void encodeVector4u16(
const Vector4u16& vect, std::shared_ptr<StreamAccess> outStream);
303 static void encodeVector4u32(
const Vector4u32& vect, std::shared_ptr<StreamAccess> outStream);
305 static void encodeVector4u64(
const Vector4u64& vect, std::shared_ptr<StreamAccess> outStream);
307 static void encodeVector4i8(
const Vector4i8& vect, std::shared_ptr<StreamAccess> outStream);
309 static void encodeVector4i16(
const Vector4i16& vect, std::shared_ptr<StreamAccess> outStream);
311 static void encodeVector4i32(
const Vector4i32& vect, std::shared_ptr<StreamAccess> outStream);
313 static void encodeVector4i64(
const Vector4i64& vect, std::shared_ptr<StreamAccess> outStream);
315 static void encodeVector4f(
const Vector4f& vect, std::shared_ptr<StreamAccess> outStream);
317 static void encodeVector4d(
const Vector4d& vect, std::shared_ptr<StreamAccess> outStream);
331 static Vector4u8 decodeVector4u8(std::shared_ptr<StreamAccess> inStream);
333 static Vector4u16 decodeVector4u16(std::shared_ptr<StreamAccess> inStream);
335 static Vector4u32 decodeVector4u32(std::shared_ptr<StreamAccess> inStream);
337 static Vector4u64 decodeVector4u64(std::shared_ptr<StreamAccess> inStream);
339 static Vector4i8 decodeVector4i8(std::shared_ptr<StreamAccess> inStream);
341 static Vector4i16 decodeVector4i16(std::shared_ptr<StreamAccess> inStream);
343 static Vector4i32 decodeVector4i32(std::shared_ptr<StreamAccess> inStream);
345 static Vector4i64 decodeVector4i64(std::shared_ptr<StreamAccess> inStream);
347 static Vector4f decodeVector4f(std::shared_ptr<StreamAccess> inStream);
349 static Vector4d decodeVector4d(std::shared_ptr<StreamAccess> inStream);
361 static void encodeVectorXu8(
const VectorXu8& vect, std::shared_ptr<StreamAccess> inStream);
363 static void encodeVectorXu16(
const VectorXu16& vect, std::shared_ptr<StreamAccess> inStream);
365 static void encodeVectorXu32(
const VectorXu32& vect, std::shared_ptr<StreamAccess> inStream);
367 static void encodeVectorXu64(
const VectorXu64& vect, std::shared_ptr<StreamAccess> inStream);
369 static void encodeVectorXi8(
const VectorXi8& vect, std::shared_ptr<StreamAccess> inStream);
371 static void encodeVectorXi16(
const VectorXi16& vect, std::shared_ptr<StreamAccess> inStream);
373 static void encodeVectorXi32(
const VectorXi32& vect, std::shared_ptr<StreamAccess> inStream);
375 static void encodeVectorXi64(
const VectorXi64& vect, std::shared_ptr<StreamAccess> inStream);
377 static void encodeVectorXf(
const VectorXf& vect, std::shared_ptr<StreamAccess> inStream);
379 static void encodeVectorXd(
const VectorXd& vect, std::shared_ptr<StreamAccess> inStream);
393 static VectorXu8 decodeVectorXu8(std::shared_ptr<StreamAccess> inStream);
395 static VectorXu16 decodeVectorXu16(std::shared_ptr<StreamAccess> inStream);
397 static VectorXu32 decodeVectorXu32(std::shared_ptr<StreamAccess> inStream);
399 static VectorXu64 decodeVectorXu64(std::shared_ptr<StreamAccess> inStream);
401 static VectorXi8 decodeVectorXi8(std::shared_ptr<StreamAccess> inStream);
403 static VectorXi16 decodeVectorXi16(std::shared_ptr<StreamAccess> inStream);
405 static VectorXi32 decodeVectorXi32(std::shared_ptr<StreamAccess> inStream);
407 static VectorXi64 decodeVectorXi64(std::shared_ptr<StreamAccess> inStream);
409 static VectorXf decodeVectorXf(std::shared_ptr<StreamAccess> inStream);
411 static VectorXd decodeVectorXd(std::shared_ptr<StreamAccess> inStream);
423 static void encodeDataFrameView(std::shared_ptr<DataFrameView> dataFrame, std::shared_ptr<StreamAccess> outStream);
437 static std::shared_ptr<DataFrameView> decodeDataFrameView(std::shared_ptr<StreamAccess> inStream);
449 static void encodeMatrix3f(
const Matrix3f& mat, std::shared_ptr<StreamAccess> outStream);
451 static void encodeMatrix4f(
const Matrix4f& mat, std::shared_ptr<StreamAccess> outStream);
453 static void encodeMatrix3d(
const Matrix3d& mat, std::shared_ptr<StreamAccess> outStream);
455 static void encodeMatrix4d(
const Matrix4d& mat, std::shared_ptr<StreamAccess> outStream);
469 static Matrix3f decodeMatrix3f(std::shared_ptr<StreamAccess> inStream);
471 static Matrix4f decodeMatrix4f(std::shared_ptr<StreamAccess> inStream);
473 static Matrix3d decodeMatrix3d(std::shared_ptr<StreamAccess> inStream);
475 static Matrix4d decodeMatrix4d(std::shared_ptr<StreamAccess> inStream);