File: native_type_test_impl.h

package info (click to toggle)
golang-github-google-flatbuffers 24.12.23-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 17,704 kB
  • sloc: cpp: 53,217; python: 6,900; cs: 5,566; java: 4,370; php: 1,460; javascript: 1,061; xml: 1,016; sh: 886; makefile: 13
file content (35 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef NATIVE_TYPE_TEST_IMPL_H
#define NATIVE_TYPE_TEST_IMPL_H

namespace Native {
struct Vector3D {
  float x;
  float y;
  float z;

  Vector3D() {
    x = 0;
    y = 0;
    z = 0;
  }
  Vector3D(float _x, float _y, float _z) {
    this->x = _x;
    this->y = _y;
    this->z = _z;
  }
};
}  // namespace Native

namespace Geometry {
struct Vector3D;
struct Vector3DAlt;
}  // namespace Geometry

namespace flatbuffers {
Geometry::Vector3D Pack(const Native::Vector3D &obj);
const Native::Vector3D UnPack(const Geometry::Vector3D &obj);
Geometry::Vector3DAlt PackVector3DAlt(const Native::Vector3D &obj);
const Native::Vector3D UnPackVector3DAlt(const Geometry::Vector3DAlt &obj);
}  // namespace flatbuffers

#endif  // VECTOR3D_PACK_H