1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements.  See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership.  The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License.  You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef SRC_BACKEND_AVRO2_RAW_FRAME_H_2514367941__H_
20 #define SRC_BACKEND_AVRO2_RAW_FRAME_H_2514367941__H_
21 
22 #include "boost/any.hpp"
23 #include "avrocpp/api/Specific.hh"
24 #include "avrocpp/api/Encoder.hh"
25 #include "avrocpp/api/Decoder.hh"
26 
27 namespace rmf_raw_avro2 {
28 struct FrameInfo {
29   int32_t id;
30   std::string name;
31   int32_t type;
32   std::vector<int32_t> parents;
33 };
34 
35 struct Label {
36   int32_t id;
37   std::string name;
38 };
39 
40 struct NodeSet {
41   int32_t id;
42   std::vector<int32_t> nodes;
43 };
44 
45 struct FileInfo {
46   std::string description;
47   std::string producer;
48   std::vector<Label> categories;
49   std::vector<Label> node_types;
50   std::vector<Label> frame_types;
51   std::vector<NodeSet> node_sets;
52 };
53 
54 struct _Frame_json_Union__0__ {
55  private:
56   size_t idx_;
57   boost::any value_;
58 
59  public:
idx_Frame_json_Union__0__60   size_t idx() const { return idx_; }
61   FrameInfo get_FrameInfo() const;
62   void set_FrameInfo(const FrameInfo& v);
63   FileInfo get_FileInfo() const;
64   void set_FileInfo(const FileInfo& v);
65   _Frame_json_Union__0__();
66 };
67 
68 struct Node {
69   int32_t id;
70   std::string name;
71   int32_t type;
72   std::vector<int32_t> parents;
73 };
74 
75 enum Type {
76   INT,
77   FLOAT,
78   STRING,
79   INTS,
80   FLOATS,
81   STRINGS,
82   VECTOR3,
83   VECTOR4,
84   VECTOR3S,
85 };
86 
87 struct KeyInfo {
88   int32_t id;
89   std::string name;
90   int32_t category;
91   Type type;
92 };
93 
94 struct IntValue {
95   int32_t id;
96   int32_t value;
97 };
98 
99 struct IntNodeData {
100   int32_t key;
101   std::vector<IntValue> values;
102 };
103 
104 struct FloatValue {
105   int32_t id;
106   float value;
107 };
108 
109 struct FloatNodeData {
110   int32_t key;
111   std::vector<FloatValue> values;
112 };
113 
114 struct StringValue {
115   int32_t id;
116   std::string value;
117 };
118 
119 struct StringNodeData {
120   int32_t key;
121   std::vector<StringValue> values;
122 };
123 
124 struct Vector3 {
125   float x;
126   float y;
127   float z;
128 };
129 
130 struct Vector3Value {
131   int32_t id;
132   Vector3 value;
133 };
134 
135 struct Vector3NodeData {
136   int32_t key;
137   std::vector<Vector3Value> values;
138 };
139 
140 struct Vector4 {
141   float w;
142   float x;
143   float y;
144   float z;
145 };
146 
147 struct Vector4Value {
148   int32_t id;
149   Vector4 value;
150 };
151 
152 struct Vector4NodeData {
153   int32_t key;
154   std::vector<Vector4Value> values;
155 };
156 
157 struct IntsValue {
158   int32_t key;
159   std::vector<int32_t> value;
160 };
161 
162 struct IntsNodeData {
163   int32_t key;
164   std::vector<IntsValue> values;
165 };
166 
167 struct FloatsValue {
168   int32_t id;
169   std::vector<float> value;
170 };
171 
172 struct FloatsNodeData {
173   int32_t id;
174   std::vector<FloatsValue> values;
175 };
176 
177 struct StringsValue {
178   int32_t id;
179   std::vector<std::string> value;
180 };
181 
182 struct StringsNodeData {
183   int32_t id;
184   std::vector<StringsValue> values;
185 };
186 
187 struct Vector3sValue {
188   int32_t id;
189   std::vector<Vector3> value;
190 };
191 
192 struct Vector3sNodeData {
193   int32_t key;
194   std::vector<Vector3sValue> values;
195 };
196 
197 struct Vector4sValue {
198   int32_t id;
199   std::vector<Vector4> value;
200 };
201 
202 struct Vector4sNodeData {
203   int32_t key;
204   std::vector<Vector4sValue> values;
205 };
206 
207 struct TypeDatas {
208   std::vector<IntNodeData> int_data;
209   std::vector<FloatNodeData> float_data;
210   std::vector<StringNodeData> string_data;
211   std::vector<Vector3NodeData> vector3_data;
212   std::vector<Vector4NodeData> vector4_data;
213   std::vector<IntsNodeData> ints_data;
214   std::vector<FloatsNodeData> floats_data;
215   std::vector<StringsNodeData> strings_data;
216   std::vector<Vector3sNodeData> vector3s_data;
217   std::vector<Vector4sNodeData> vector4s_data;
218 };
219 
220 struct Frame {
221   typedef _Frame_json_Union__0__ info_t;
222   info_t info;
223   std::vector<Node> nodes;
224   std::vector<KeyInfo> keys;
225   TypeDatas data;
226 };
227 
get_FrameInfo()228 inline FrameInfo _Frame_json_Union__0__::get_FrameInfo() const {
229   if (idx_ != 0) {
230     throw internal_avro::Exception("Invalid type for union");
231   }
232   return boost::any_cast<FrameInfo>(value_);
233 }
234 
set_FrameInfo(const FrameInfo & v)235 inline void _Frame_json_Union__0__::set_FrameInfo(const FrameInfo& v) {
236   idx_ = 0;
237   value_ = v;
238 }
239 
get_FileInfo()240 inline FileInfo _Frame_json_Union__0__::get_FileInfo() const {
241   if (idx_ != 1) {
242     throw internal_avro::Exception("Invalid type for union");
243   }
244   return boost::any_cast<FileInfo>(value_);
245 }
246 
set_FileInfo(const FileInfo & v)247 inline void _Frame_json_Union__0__::set_FileInfo(const FileInfo& v) {
248   idx_ = 1;
249   value_ = v;
250 }
251 
_Frame_json_Union__0__()252 inline _Frame_json_Union__0__::_Frame_json_Union__0__()
253     : idx_(0), value_(FrameInfo()) {}
254 }
255 namespace internal_avro {
256 template <>
257 struct codec_traits<rmf_raw_avro2::FrameInfo> {
258   template <class Encoder>
259   static void encode(Encoder& e, const rmf_raw_avro2::FrameInfo& v) {
260     internal_avro::encode(e, v.id);
261     internal_avro::encode(e, v.name);
262     internal_avro::encode(e, v.type);
263     internal_avro::encode(e, v.parents);
264   }
265   template <class Decoder>
266   static void decode(Decoder& d, rmf_raw_avro2::FrameInfo& v) {
267     internal_avro::decode(d, v.id);
268     internal_avro::decode(d, v.name);
269     internal_avro::decode(d, v.type);
270     internal_avro::decode(d, v.parents);
271   }
272 };
273 
274 template <>
275 struct codec_traits<rmf_raw_avro2::Label> {
276   template <class Encoder>
277   static void encode(Encoder& e, const rmf_raw_avro2::Label& v) {
278     internal_avro::encode(e, v.id);
279     internal_avro::encode(e, v.name);
280   }
281   template <class Decoder>
282   static void decode(Decoder& d, rmf_raw_avro2::Label& v) {
283     internal_avro::decode(d, v.id);
284     internal_avro::decode(d, v.name);
285   }
286 };
287 
288 template <>
289 struct codec_traits<rmf_raw_avro2::NodeSet> {
290   template <class Encoder>
291   static void encode(Encoder& e, const rmf_raw_avro2::NodeSet& v) {
292     internal_avro::encode(e, v.id);
293     internal_avro::encode(e, v.nodes);
294   }
295   template <class Decoder>
296   static void decode(Decoder& d, rmf_raw_avro2::NodeSet& v) {
297     internal_avro::decode(d, v.id);
298     internal_avro::decode(d, v.nodes);
299   }
300 };
301 
302 template <>
303 struct codec_traits<rmf_raw_avro2::FileInfo> {
304   template <class Encoder>
305   static void encode(Encoder& e, const rmf_raw_avro2::FileInfo& v) {
306     internal_avro::encode(e, v.description);
307     internal_avro::encode(e, v.producer);
308     internal_avro::encode(e, v.categories);
309     internal_avro::encode(e, v.node_types);
310     internal_avro::encode(e, v.frame_types);
311     internal_avro::encode(e, v.node_sets);
312   }
313   template <class Decoder>
314   static void decode(Decoder& d, rmf_raw_avro2::FileInfo& v) {
315     internal_avro::decode(d, v.description);
316     internal_avro::decode(d, v.producer);
317     internal_avro::decode(d, v.categories);
318     internal_avro::decode(d, v.node_types);
319     internal_avro::decode(d, v.frame_types);
320     internal_avro::decode(d, v.node_sets);
321   }
322 };
323 
324 template <>
325 struct codec_traits<rmf_raw_avro2::_Frame_json_Union__0__> {
326   template <class Encoder>
327   static void encode(Encoder& e, rmf_raw_avro2::_Frame_json_Union__0__ v) {
328     e.encodeUnionIndex(v.idx());
329     switch (v.idx()) {
330       case 0:
331         internal_avro::encode(e, v.get_FrameInfo());
332         break;
333       case 1:
334         internal_avro::encode(e, v.get_FileInfo());
335         break;
336     }
337   }
338   template <class Decoder>
339   static void decode(Decoder& d, rmf_raw_avro2::_Frame_json_Union__0__& v) {
340     size_t n = d.decodeUnionIndex();
341     if (n >= 2) {
342       throw internal_avro::Exception("Union index too big");
343     }
344     switch (n) {
345       case 0: {
346         rmf_raw_avro2::FrameInfo vv;
347         internal_avro::decode(d, vv);
348         v.set_FrameInfo(vv);
349       } break;
350       case 1: {
351         rmf_raw_avro2::FileInfo vv;
352         internal_avro::decode(d, vv);
353         v.set_FileInfo(vv);
354       } break;
355     }
356   }
357 };
358 
359 template <>
360 struct codec_traits<rmf_raw_avro2::Node> {
361   template <class Encoder>
362   static void encode(Encoder& e, const rmf_raw_avro2::Node& v) {
363     internal_avro::encode(e, v.id);
364     internal_avro::encode(e, v.name);
365     internal_avro::encode(e, v.type);
366     internal_avro::encode(e, v.parents);
367   }
368   template <class Decoder>
369   static void decode(Decoder& d, rmf_raw_avro2::Node& v) {
370     internal_avro::decode(d, v.id);
371     internal_avro::decode(d, v.name);
372     internal_avro::decode(d, v.type);
373     internal_avro::decode(d, v.parents);
374   }
375 };
376 
377 template <>
378 struct codec_traits<rmf_raw_avro2::Type> {
379   template <class Encoder>
380   static void encode(Encoder& e, rmf_raw_avro2::Type v) {
381     e.encodeEnum(v);
382   }
383   template <class Decoder>
384   static void decode(Decoder& d, rmf_raw_avro2::Type& v) {
385     v = static_cast<rmf_raw_avro2::Type>(d.decodeEnum());
386   }
387 };
388 
389 template <>
390 struct codec_traits<rmf_raw_avro2::KeyInfo> {
391   template <class Encoder>
392   static void encode(Encoder& e, const rmf_raw_avro2::KeyInfo& v) {
393     internal_avro::encode(e, v.id);
394     internal_avro::encode(e, v.name);
395     internal_avro::encode(e, v.category);
396     internal_avro::encode(e, v.type);
397   }
398   template <class Decoder>
399   static void decode(Decoder& d, rmf_raw_avro2::KeyInfo& v) {
400     internal_avro::decode(d, v.id);
401     internal_avro::decode(d, v.name);
402     internal_avro::decode(d, v.category);
403     internal_avro::decode(d, v.type);
404   }
405 };
406 
407 template <>
408 struct codec_traits<rmf_raw_avro2::IntValue> {
409   template <class Encoder>
410   static void encode(Encoder& e, const rmf_raw_avro2::IntValue& v) {
411     internal_avro::encode(e, v.id);
412     internal_avro::encode(e, v.value);
413   }
414   template <class Decoder>
415   static void decode(Decoder& d, rmf_raw_avro2::IntValue& v) {
416     internal_avro::decode(d, v.id);
417     internal_avro::decode(d, v.value);
418   }
419 };
420 
421 template <>
422 struct codec_traits<rmf_raw_avro2::IntNodeData> {
423   template <class Encoder>
424   static void encode(Encoder& e, const rmf_raw_avro2::IntNodeData& v) {
425     internal_avro::encode(e, v.key);
426     internal_avro::encode(e, v.values);
427   }
428   template <class Decoder>
429   static void decode(Decoder& d, rmf_raw_avro2::IntNodeData& v) {
430     internal_avro::decode(d, v.key);
431     internal_avro::decode(d, v.values);
432   }
433 };
434 
435 template <>
436 struct codec_traits<rmf_raw_avro2::FloatValue> {
437   template <class Encoder>
438   static void encode(Encoder& e, const rmf_raw_avro2::FloatValue& v) {
439     internal_avro::encode(e, v.id);
440     internal_avro::encode(e, v.value);
441   }
442   template <class Decoder>
443   static void decode(Decoder& d, rmf_raw_avro2::FloatValue& v) {
444     internal_avro::decode(d, v.id);
445     internal_avro::decode(d, v.value);
446   }
447 };
448 
449 template <>
450 struct codec_traits<rmf_raw_avro2::FloatNodeData> {
451   template <class Encoder>
452   static void encode(Encoder& e, const rmf_raw_avro2::FloatNodeData& v) {
453     internal_avro::encode(e, v.key);
454     internal_avro::encode(e, v.values);
455   }
456   template <class Decoder>
457   static void decode(Decoder& d, rmf_raw_avro2::FloatNodeData& v) {
458     internal_avro::decode(d, v.key);
459     internal_avro::decode(d, v.values);
460   }
461 };
462 
463 template <>
464 struct codec_traits<rmf_raw_avro2::StringValue> {
465   template <class Encoder>
466   static void encode(Encoder& e, const rmf_raw_avro2::StringValue& v) {
467     internal_avro::encode(e, v.id);
468     internal_avro::encode(e, v.value);
469   }
470   template <class Decoder>
471   static void decode(Decoder& d, rmf_raw_avro2::StringValue& v) {
472     internal_avro::decode(d, v.id);
473     internal_avro::decode(d, v.value);
474   }
475 };
476 
477 template <>
478 struct codec_traits<rmf_raw_avro2::StringNodeData> {
479   template <class Encoder>
480   static void encode(Encoder& e, const rmf_raw_avro2::StringNodeData& v) {
481     internal_avro::encode(e, v.key);
482     internal_avro::encode(e, v.values);
483   }
484   template <class Decoder>
485   static void decode(Decoder& d, rmf_raw_avro2::StringNodeData& v) {
486     internal_avro::decode(d, v.key);
487     internal_avro::decode(d, v.values);
488   }
489 };
490 
491 template <>
492 struct codec_traits<rmf_raw_avro2::Vector3> {
493   template <class Encoder>
494   static void encode(Encoder& e, const rmf_raw_avro2::Vector3& v) {
495     internal_avro::encode(e, v.x);
496     internal_avro::encode(e, v.y);
497     internal_avro::encode(e, v.z);
498   }
499   template <class Decoder>
500   static void decode(Decoder& d, rmf_raw_avro2::Vector3& v) {
501     internal_avro::decode(d, v.x);
502     internal_avro::decode(d, v.y);
503     internal_avro::decode(d, v.z);
504   }
505 };
506 
507 template <>
508 struct codec_traits<rmf_raw_avro2::Vector3Value> {
509   template <class Encoder>
510   static void encode(Encoder& e, const rmf_raw_avro2::Vector3Value& v) {
511     internal_avro::encode(e, v.id);
512     internal_avro::encode(e, v.value);
513   }
514   template <class Decoder>
515   static void decode(Decoder& d, rmf_raw_avro2::Vector3Value& v) {
516     internal_avro::decode(d, v.id);
517     internal_avro::decode(d, v.value);
518   }
519 };
520 
521 template <>
522 struct codec_traits<rmf_raw_avro2::Vector3NodeData> {
523   template <class Encoder>
524   static void encode(Encoder& e, const rmf_raw_avro2::Vector3NodeData& v) {
525     internal_avro::encode(e, v.key);
526     internal_avro::encode(e, v.values);
527   }
528   template <class Decoder>
529   static void decode(Decoder& d, rmf_raw_avro2::Vector3NodeData& v) {
530     internal_avro::decode(d, v.key);
531     internal_avro::decode(d, v.values);
532   }
533 };
534 
535 template <>
536 struct codec_traits<rmf_raw_avro2::Vector4> {
537   template <class Encoder>
538   static void encode(Encoder& e, const rmf_raw_avro2::Vector4& v) {
539     internal_avro::encode(e, v.w);
540     internal_avro::encode(e, v.x);
541     internal_avro::encode(e, v.y);
542     internal_avro::encode(e, v.z);
543   }
544   template <class Decoder>
545   static void decode(Decoder& d, rmf_raw_avro2::Vector4& v) {
546     internal_avro::decode(d, v.w);
547     internal_avro::decode(d, v.x);
548     internal_avro::decode(d, v.y);
549     internal_avro::decode(d, v.z);
550   }
551 };
552 
553 template <>
554 struct codec_traits<rmf_raw_avro2::Vector4Value> {
555   template <class Encoder>
556   static void encode(Encoder& e, const rmf_raw_avro2::Vector4Value& v) {
557     internal_avro::encode(e, v.id);
558     internal_avro::encode(e, v.value);
559   }
560   template <class Decoder>
561   static void decode(Decoder& d, rmf_raw_avro2::Vector4Value& v) {
562     internal_avro::decode(d, v.id);
563     internal_avro::decode(d, v.value);
564   }
565 };
566 
567 template <>
568 struct codec_traits<rmf_raw_avro2::Vector4NodeData> {
569   template <class Encoder>
570   static void encode(Encoder& e, const rmf_raw_avro2::Vector4NodeData& v) {
571     internal_avro::encode(e, v.key);
572     internal_avro::encode(e, v.values);
573   }
574   template <class Decoder>
575   static void decode(Decoder& d, rmf_raw_avro2::Vector4NodeData& v) {
576     internal_avro::decode(d, v.key);
577     internal_avro::decode(d, v.values);
578   }
579 };
580 
581 template <>
582 struct codec_traits<rmf_raw_avro2::IntsValue> {
583   template <class Encoder>
584   static void encode(Encoder& e, const rmf_raw_avro2::IntsValue& v) {
585     internal_avro::encode(e, v.key);
586     internal_avro::encode(e, v.value);
587   }
588   template <class Decoder>
589   static void decode(Decoder& d, rmf_raw_avro2::IntsValue& v) {
590     internal_avro::decode(d, v.key);
591     internal_avro::decode(d, v.value);
592   }
593 };
594 
595 template <>
596 struct codec_traits<rmf_raw_avro2::IntsNodeData> {
597   template <class Encoder>
598   static void encode(Encoder& e, const rmf_raw_avro2::IntsNodeData& v) {
599     internal_avro::encode(e, v.key);
600     internal_avro::encode(e, v.values);
601   }
602   template <class Decoder>
603   static void decode(Decoder& d, rmf_raw_avro2::IntsNodeData& v) {
604     internal_avro::decode(d, v.key);
605     internal_avro::decode(d, v.values);
606   }
607 };
608 
609 template <>
610 struct codec_traits<rmf_raw_avro2::FloatsValue> {
611   template <class Encoder>
612   static void encode(Encoder& e, const rmf_raw_avro2::FloatsValue& v) {
613     internal_avro::encode(e, v.id);
614     internal_avro::encode(e, v.value);
615   }
616   template <class Decoder>
617   static void decode(Decoder& d, rmf_raw_avro2::FloatsValue& v) {
618     internal_avro::decode(d, v.id);
619     internal_avro::decode(d, v.value);
620   }
621 };
622 
623 template <>
624 struct codec_traits<rmf_raw_avro2::FloatsNodeData> {
625   template <class Encoder>
626   static void encode(Encoder& e, const rmf_raw_avro2::FloatsNodeData& v) {
627     internal_avro::encode(e, v.id);
628     internal_avro::encode(e, v.values);
629   }
630   template <class Decoder>
631   static void decode(Decoder& d, rmf_raw_avro2::FloatsNodeData& v) {
632     internal_avro::decode(d, v.id);
633     internal_avro::decode(d, v.values);
634   }
635 };
636 
637 template <>
638 struct codec_traits<rmf_raw_avro2::StringsValue> {
639   template <class Encoder>
640   static void encode(Encoder& e, const rmf_raw_avro2::StringsValue& v) {
641     internal_avro::encode(e, v.id);
642     internal_avro::encode(e, v.value);
643   }
644   template <class Decoder>
645   static void decode(Decoder& d, rmf_raw_avro2::StringsValue& v) {
646     internal_avro::decode(d, v.id);
647     internal_avro::decode(d, v.value);
648   }
649 };
650 
651 template <>
652 struct codec_traits<rmf_raw_avro2::StringsNodeData> {
653   template <class Encoder>
654   static void encode(Encoder& e, const rmf_raw_avro2::StringsNodeData& v) {
655     internal_avro::encode(e, v.id);
656     internal_avro::encode(e, v.values);
657   }
658   template <class Decoder>
659   static void decode(Decoder& d, rmf_raw_avro2::StringsNodeData& v) {
660     internal_avro::decode(d, v.id);
661     internal_avro::decode(d, v.values);
662   }
663 };
664 
665 template <>
666 struct codec_traits<rmf_raw_avro2::Vector3sValue> {
667   template <class Encoder>
668   static void encode(Encoder& e, const rmf_raw_avro2::Vector3sValue& v) {
669     internal_avro::encode(e, v.id);
670     internal_avro::encode(e, v.value);
671   }
672   template <class Decoder>
673   static void decode(Decoder& d, rmf_raw_avro2::Vector3sValue& v) {
674     internal_avro::decode(d, v.id);
675     internal_avro::decode(d, v.value);
676   }
677 };
678 
679 template <>
680 struct codec_traits<rmf_raw_avro2::Vector3sNodeData> {
681   template <class Encoder>
682   static void encode(Encoder& e, const rmf_raw_avro2::Vector3sNodeData& v) {
683     internal_avro::encode(e, v.key);
684     internal_avro::encode(e, v.values);
685   }
686   template <class Decoder>
687   static void decode(Decoder& d, rmf_raw_avro2::Vector3sNodeData& v) {
688     internal_avro::decode(d, v.key);
689     internal_avro::decode(d, v.values);
690   }
691 };
692 
693 template <>
694 struct codec_traits<rmf_raw_avro2::Vector4sValue> {
695   template <class Encoder>
696   static void encode(Encoder& e, const rmf_raw_avro2::Vector4sValue& v) {
697     internal_avro::encode(e, v.id);
698     internal_avro::encode(e, v.value);
699   }
700   template <class Decoder>
701   static void decode(Decoder& d, rmf_raw_avro2::Vector4sValue& v) {
702     internal_avro::decode(d, v.id);
703     internal_avro::decode(d, v.value);
704   }
705 };
706 
707 template <>
708 struct codec_traits<rmf_raw_avro2::Vector4sNodeData> {
709   template <class Encoder>
710   static void encode(Encoder& e, const rmf_raw_avro2::Vector4sNodeData& v) {
711     internal_avro::encode(e, v.key);
712     internal_avro::encode(e, v.values);
713   }
714   template <class Decoder>
715   static void decode(Decoder& d, rmf_raw_avro2::Vector4sNodeData& v) {
716     internal_avro::decode(d, v.key);
717     internal_avro::decode(d, v.values);
718   }
719 };
720 
721 template <>
722 struct codec_traits<rmf_raw_avro2::TypeDatas> {
723   template <class Encoder>
724   static void encode(Encoder& e, const rmf_raw_avro2::TypeDatas& v) {
725     internal_avro::encode(e, v.int_data);
726     internal_avro::encode(e, v.float_data);
727     internal_avro::encode(e, v.string_data);
728     internal_avro::encode(e, v.vector3_data);
729     internal_avro::encode(e, v.vector4_data);
730     internal_avro::encode(e, v.ints_data);
731     internal_avro::encode(e, v.floats_data);
732     internal_avro::encode(e, v.strings_data);
733     internal_avro::encode(e, v.vector3s_data);
734     internal_avro::encode(e, v.vector4s_data);
735   }
736   template <class Decoder>
737   static void decode(Decoder& d, rmf_raw_avro2::TypeDatas& v) {
738     internal_avro::decode(d, v.int_data);
739     internal_avro::decode(d, v.float_data);
740     internal_avro::decode(d, v.string_data);
741     internal_avro::decode(d, v.vector3_data);
742     internal_avro::decode(d, v.vector4_data);
743     internal_avro::decode(d, v.ints_data);
744     internal_avro::decode(d, v.floats_data);
745     internal_avro::decode(d, v.strings_data);
746     internal_avro::decode(d, v.vector3s_data);
747     internal_avro::decode(d, v.vector4s_data);
748   }
749 };
750 
751 template <>
752 struct codec_traits<rmf_raw_avro2::Frame> {
753   template <class Encoder>
754   static void encode(Encoder& e, const rmf_raw_avro2::Frame& v) {
755     internal_avro::encode(e, v.info);
756     internal_avro::encode(e, v.nodes);
757     internal_avro::encode(e, v.keys);
758     internal_avro::encode(e, v.data);
759   }
760   template <class Decoder>
761   static void decode(Decoder& d, rmf_raw_avro2::Frame& v) {
762     internal_avro::decode(d, v.info);
763     internal_avro::decode(d, v.nodes);
764     internal_avro::decode(d, v.keys);
765     internal_avro::decode(d, v.data);
766   }
767 };
768 }
769 #endif
770