Created
October 17, 2021 13:32
-
-
Save japm48/d558f240cb1d729e19d4b4514f541030 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 01_sigmf_core_generated.h 2021-10-17 15:28:31.000000000 +0200 | |
+++ 02_sigmf_core_generated.h 2021-10-17 15:21:32.000000000 +0200 | |
@@ -9,15 +9,19 @@ | |
namespace core { | |
struct Global; | |
+struct GlobalBuilder; | |
struct GlobalT; | |
struct Capture; | |
+struct CaptureBuilder; | |
struct CaptureT; | |
struct Annotation; | |
+struct AnnotationBuilder; | |
struct AnnotationT; | |
struct Descr; | |
+struct DescrBuilder; | |
struct DescrT; | |
inline const flatbuffers::TypeTable *GlobalTypeTable(); | |
@@ -30,26 +34,23 @@ | |
struct GlobalT : public flatbuffers::NativeTable { | |
typedef Global TableType; | |
- std::string datatype; | |
- double sample_rate; | |
- std::string version; | |
- std::string sha512; | |
- uint32_t offset; | |
- std::string description; | |
- std::string author; | |
- std::string meta_doi; | |
- std::string data_doi; | |
- std::string recorder; | |
- std::string license; | |
- std::string hw; | |
- GlobalT() | |
- : sample_rate(0.0), | |
- offset(0) { | |
- } | |
+ std::string datatype{}; | |
+ double sample_rate = 0.0; | |
+ std::string version{}; | |
+ std::string sha512{}; | |
+ uint32_t offset = 0; | |
+ std::string description{}; | |
+ std::string author{}; | |
+ std::string meta_doi{}; | |
+ std::string data_doi{}; | |
+ std::string recorder{}; | |
+ std::string license{}; | |
+ std::string hw{}; | |
}; | |
struct Global FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { | |
typedef GlobalT NativeTableType; | |
+ typedef GlobalBuilder Builder; | |
static const flatbuffers::TypeTable *MiniReflectTypeTable() { | |
return GlobalTypeTable(); | |
} | |
@@ -135,6 +136,7 @@ | |
}; | |
struct GlobalBuilder { | |
+ typedef Global Table; | |
flatbuffers::FlatBufferBuilder &fbb_; | |
flatbuffers::uoffset_t start_; | |
void add_datatype(flatbuffers::Offset<flatbuffers::String> datatype) { | |
@@ -177,7 +179,6 @@ | |
: fbb_(_fbb) { | |
start_ = fbb_.StartTable(); | |
} | |
- GlobalBuilder &operator=(const GlobalBuilder &); | |
flatbuffers::Offset<Global> Finish() { | |
const auto end = fbb_.EndTable(start_); | |
auto o = flatbuffers::Offset<Global>(end); | |
@@ -259,19 +260,15 @@ | |
struct CaptureT : public flatbuffers::NativeTable { | |
typedef Capture TableType; | |
- uint64_t sample_start; | |
- uint64_t global_index; | |
- double frequency; | |
- std::string datetime; | |
- CaptureT() | |
- : sample_start(0), | |
- global_index(0), | |
- frequency(0.0) { | |
- } | |
+ uint64_t sample_start = 0; | |
+ uint64_t global_index = 0; | |
+ double frequency = 0.0; | |
+ std::string datetime{}; | |
}; | |
struct Capture FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { | |
typedef CaptureT NativeTableType; | |
+ typedef CaptureBuilder Builder; | |
static const flatbuffers::TypeTable *MiniReflectTypeTable() { | |
return CaptureTypeTable(); | |
} | |
@@ -308,6 +305,7 @@ | |
}; | |
struct CaptureBuilder { | |
+ typedef Capture Table; | |
flatbuffers::FlatBufferBuilder &fbb_; | |
flatbuffers::uoffset_t start_; | |
void add_sample_start(uint64_t sample_start) { | |
@@ -326,7 +324,6 @@ | |
: fbb_(_fbb) { | |
start_ = fbb_.StartTable(); | |
} | |
- CaptureBuilder &operator=(const CaptureBuilder &); | |
flatbuffers::Offset<Capture> Finish() { | |
const auto end = fbb_.EndTable(start_); | |
auto o = flatbuffers::Offset<Capture>(end); | |
@@ -367,23 +364,18 @@ | |
struct AnnotationT : public flatbuffers::NativeTable { | |
typedef Annotation TableType; | |
- double freq_lower_edge; | |
- double freq_upper_edge; | |
- uint64_t sample_start; | |
- uint64_t sample_count; | |
- std::string description; | |
- std::string generator; | |
- std::string comment; | |
- AnnotationT() | |
- : freq_lower_edge(0.0), | |
- freq_upper_edge(0.0), | |
- sample_start(0), | |
- sample_count(0) { | |
- } | |
+ double freq_lower_edge = 0.0; | |
+ double freq_upper_edge = 0.0; | |
+ uint64_t sample_start = 0; | |
+ uint64_t sample_count = 0; | |
+ std::string description{}; | |
+ std::string generator{}; | |
+ std::string comment{}; | |
}; | |
struct Annotation FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { | |
typedef AnnotationT NativeTableType; | |
+ typedef AnnotationBuilder Builder; | |
static const flatbuffers::TypeTable *MiniReflectTypeTable() { | |
return AnnotationTypeTable(); | |
} | |
@@ -437,6 +429,7 @@ | |
}; | |
struct AnnotationBuilder { | |
+ typedef Annotation Table; | |
flatbuffers::FlatBufferBuilder &fbb_; | |
flatbuffers::uoffset_t start_; | |
void add_freq_lower_edge(double freq_lower_edge) { | |
@@ -464,7 +457,6 @@ | |
: fbb_(_fbb) { | |
start_ = fbb_.StartTable(); | |
} | |
- AnnotationBuilder &operator=(const AnnotationBuilder &); | |
flatbuffers::Offset<Annotation> Finish() { | |
const auto end = fbb_.EndTable(start_); | |
auto o = flatbuffers::Offset<Annotation>(end); | |
@@ -519,15 +511,14 @@ | |
struct DescrT : public flatbuffers::NativeTable { | |
typedef Descr TableType; | |
- std::unique_ptr<GlobalT> global; | |
- std::unique_ptr<AnnotationT> annotation; | |
- std::unique_ptr<CaptureT> capture; | |
- DescrT() { | |
- } | |
+ std::unique_ptr<core::GlobalT> global{}; | |
+ std::unique_ptr<core::AnnotationT> annotation{}; | |
+ std::unique_ptr<core::CaptureT> capture{}; | |
}; | |
struct Descr FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { | |
typedef DescrT NativeTableType; | |
+ typedef DescrBuilder Builder; | |
static const flatbuffers::TypeTable *MiniReflectTypeTable() { | |
return DescrTypeTable(); | |
} | |
@@ -536,14 +527,14 @@ | |
VT_ANNOTATION = 6, | |
VT_CAPTURE = 8 | |
}; | |
- const Global *global() const { | |
- return GetPointer<const Global *>(VT_GLOBAL); | |
+ const core::Global *global() const { | |
+ return GetPointer<const core::Global *>(VT_GLOBAL); | |
} | |
- const Annotation *annotation() const { | |
- return GetPointer<const Annotation *>(VT_ANNOTATION); | |
+ const core::Annotation *annotation() const { | |
+ return GetPointer<const core::Annotation *>(VT_ANNOTATION); | |
} | |
- const Capture *capture() const { | |
- return GetPointer<const Capture *>(VT_CAPTURE); | |
+ const core::Capture *capture() const { | |
+ return GetPointer<const core::Capture *>(VT_CAPTURE); | |
} | |
bool Verify(flatbuffers::Verifier &verifier) const { | |
return VerifyTableStart(verifier) && | |
@@ -561,22 +552,22 @@ | |
}; | |
struct DescrBuilder { | |
+ typedef Descr Table; | |
flatbuffers::FlatBufferBuilder &fbb_; | |
flatbuffers::uoffset_t start_; | |
- void add_global(flatbuffers::Offset<Global> global) { | |
+ void add_global(flatbuffers::Offset<core::Global> global) { | |
fbb_.AddOffset(Descr::VT_GLOBAL, global); | |
} | |
- void add_annotation(flatbuffers::Offset<Annotation> annotation) { | |
+ void add_annotation(flatbuffers::Offset<core::Annotation> annotation) { | |
fbb_.AddOffset(Descr::VT_ANNOTATION, annotation); | |
} | |
- void add_capture(flatbuffers::Offset<Capture> capture) { | |
+ void add_capture(flatbuffers::Offset<core::Capture> capture) { | |
fbb_.AddOffset(Descr::VT_CAPTURE, capture); | |
} | |
explicit DescrBuilder(flatbuffers::FlatBufferBuilder &_fbb) | |
: fbb_(_fbb) { | |
start_ = fbb_.StartTable(); | |
} | |
- DescrBuilder &operator=(const DescrBuilder &); | |
flatbuffers::Offset<Descr> Finish() { | |
const auto end = fbb_.EndTable(start_); | |
auto o = flatbuffers::Offset<Descr>(end); | |
@@ -586,9 +577,9 @@ | |
inline flatbuffers::Offset<Descr> CreateDescr( | |
flatbuffers::FlatBufferBuilder &_fbb, | |
- flatbuffers::Offset<Global> global = 0, | |
- flatbuffers::Offset<Annotation> annotation = 0, | |
- flatbuffers::Offset<Capture> capture = 0) { | |
+ flatbuffers::Offset<core::Global> global = 0, | |
+ flatbuffers::Offset<core::Annotation> annotation = 0, | |
+ flatbuffers::Offset<core::Capture> capture = 0) { | |
DescrBuilder builder_(_fbb); | |
builder_.add_capture(capture); | |
builder_.add_annotation(annotation); | |
@@ -599,26 +590,26 @@ | |
flatbuffers::Offset<Descr> CreateDescr(flatbuffers::FlatBufferBuilder &_fbb, const DescrT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); | |
inline GlobalT *Global::UnPack(const flatbuffers::resolver_function_t *_resolver) const { | |
- auto _o = new GlobalT(); | |
- UnPackTo(_o, _resolver); | |
- return _o; | |
+ auto _o = std::unique_ptr<GlobalT>(new GlobalT()); | |
+ UnPackTo(_o.get(), _resolver); | |
+ return _o.release(); | |
} | |
inline void Global::UnPackTo(GlobalT *_o, const flatbuffers::resolver_function_t *_resolver) const { | |
(void)_o; | |
(void)_resolver; | |
- { auto _e = datatype(); if (_e) _o->datatype = _e->str(); }; | |
- { auto _e = sample_rate(); _o->sample_rate = _e; }; | |
- { auto _e = version(); if (_e) _o->version = _e->str(); }; | |
- { auto _e = sha512(); if (_e) _o->sha512 = _e->str(); }; | |
- { auto _e = offset(); _o->offset = _e; }; | |
- { auto _e = description(); if (_e) _o->description = _e->str(); }; | |
- { auto _e = author(); if (_e) _o->author = _e->str(); }; | |
- { auto _e = meta_doi(); if (_e) _o->meta_doi = _e->str(); }; | |
- { auto _e = data_doi(); if (_e) _o->data_doi = _e->str(); }; | |
- { auto _e = recorder(); if (_e) _o->recorder = _e->str(); }; | |
- { auto _e = license(); if (_e) _o->license = _e->str(); }; | |
- { auto _e = hw(); if (_e) _o->hw = _e->str(); }; | |
+ { auto _e = datatype(); if (_e) _o->datatype = _e->str(); } | |
+ { auto _e = sample_rate(); _o->sample_rate = _e; } | |
+ { auto _e = version(); if (_e) _o->version = _e->str(); } | |
+ { auto _e = sha512(); if (_e) _o->sha512 = _e->str(); } | |
+ { auto _e = offset(); _o->offset = _e; } | |
+ { auto _e = description(); if (_e) _o->description = _e->str(); } | |
+ { auto _e = author(); if (_e) _o->author = _e->str(); } | |
+ { auto _e = meta_doi(); if (_e) _o->meta_doi = _e->str(); } | |
+ { auto _e = data_doi(); if (_e) _o->data_doi = _e->str(); } | |
+ { auto _e = recorder(); if (_e) _o->recorder = _e->str(); } | |
+ { auto _e = license(); if (_e) _o->license = _e->str(); } | |
+ { auto _e = hw(); if (_e) _o->hw = _e->str(); } | |
} | |
inline flatbuffers::Offset<Global> Global::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GlobalT* _o, const flatbuffers::rehasher_function_t *_rehasher) { | |
@@ -658,18 +649,18 @@ | |
} | |
inline CaptureT *Capture::UnPack(const flatbuffers::resolver_function_t *_resolver) const { | |
- auto _o = new CaptureT(); | |
- UnPackTo(_o, _resolver); | |
- return _o; | |
+ auto _o = std::unique_ptr<CaptureT>(new CaptureT()); | |
+ UnPackTo(_o.get(), _resolver); | |
+ return _o.release(); | |
} | |
inline void Capture::UnPackTo(CaptureT *_o, const flatbuffers::resolver_function_t *_resolver) const { | |
(void)_o; | |
(void)_resolver; | |
- { auto _e = sample_start(); _o->sample_start = _e; }; | |
- { auto _e = global_index(); _o->global_index = _e; }; | |
- { auto _e = frequency(); _o->frequency = _e; }; | |
- { auto _e = datetime(); if (_e) _o->datetime = _e->str(); }; | |
+ { auto _e = sample_start(); _o->sample_start = _e; } | |
+ { auto _e = global_index(); _o->global_index = _e; } | |
+ { auto _e = frequency(); _o->frequency = _e; } | |
+ { auto _e = datetime(); if (_e) _o->datetime = _e->str(); } | |
} | |
inline flatbuffers::Offset<Capture> Capture::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CaptureT* _o, const flatbuffers::rehasher_function_t *_rehasher) { | |
@@ -693,21 +684,21 @@ | |
} | |
inline AnnotationT *Annotation::UnPack(const flatbuffers::resolver_function_t *_resolver) const { | |
- auto _o = new AnnotationT(); | |
- UnPackTo(_o, _resolver); | |
- return _o; | |
+ auto _o = std::unique_ptr<AnnotationT>(new AnnotationT()); | |
+ UnPackTo(_o.get(), _resolver); | |
+ return _o.release(); | |
} | |
inline void Annotation::UnPackTo(AnnotationT *_o, const flatbuffers::resolver_function_t *_resolver) const { | |
(void)_o; | |
(void)_resolver; | |
- { auto _e = freq_lower_edge(); _o->freq_lower_edge = _e; }; | |
- { auto _e = freq_upper_edge(); _o->freq_upper_edge = _e; }; | |
- { auto _e = sample_start(); _o->sample_start = _e; }; | |
- { auto _e = sample_count(); _o->sample_count = _e; }; | |
- { auto _e = description(); if (_e) _o->description = _e->str(); }; | |
- { auto _e = generator(); if (_e) _o->generator = _e->str(); }; | |
- { auto _e = comment(); if (_e) _o->comment = _e->str(); }; | |
+ { auto _e = freq_lower_edge(); _o->freq_lower_edge = _e; } | |
+ { auto _e = freq_upper_edge(); _o->freq_upper_edge = _e; } | |
+ { auto _e = sample_start(); _o->sample_start = _e; } | |
+ { auto _e = sample_count(); _o->sample_count = _e; } | |
+ { auto _e = description(); if (_e) _o->description = _e->str(); } | |
+ { auto _e = generator(); if (_e) _o->generator = _e->str(); } | |
+ { auto _e = comment(); if (_e) _o->comment = _e->str(); } | |
} | |
inline flatbuffers::Offset<Annotation> Annotation::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AnnotationT* _o, const flatbuffers::rehasher_function_t *_rehasher) { | |
@@ -737,17 +728,17 @@ | |
} | |
inline DescrT *Descr::UnPack(const flatbuffers::resolver_function_t *_resolver) const { | |
- auto _o = new DescrT(); | |
- UnPackTo(_o, _resolver); | |
- return _o; | |
+ auto _o = std::unique_ptr<DescrT>(new DescrT()); | |
+ UnPackTo(_o.get(), _resolver); | |
+ return _o.release(); | |
} | |
inline void Descr::UnPackTo(DescrT *_o, const flatbuffers::resolver_function_t *_resolver) const { | |
(void)_o; | |
(void)_resolver; | |
- { auto _e = global(); if (_e) _o->global = std::unique_ptr<GlobalT>(_e->UnPack(_resolver)); }; | |
- { auto _e = annotation(); if (_e) _o->annotation = std::unique_ptr<AnnotationT>(_e->UnPack(_resolver)); }; | |
- { auto _e = capture(); if (_e) _o->capture = std::unique_ptr<CaptureT>(_e->UnPack(_resolver)); }; | |
+ { auto _e = global(); if (_e) _o->global = std::unique_ptr<core::GlobalT>(_e->UnPack(_resolver)); } | |
+ { auto _e = annotation(); if (_e) _o->annotation = std::unique_ptr<core::AnnotationT>(_e->UnPack(_resolver)); } | |
+ { auto _e = capture(); if (_e) _o->capture = std::unique_ptr<core::CaptureT>(_e->UnPack(_resolver)); } | |
} | |
inline flatbuffers::Offset<Descr> Descr::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DescrT* _o, const flatbuffers::rehasher_function_t *_rehasher) { | |
@@ -798,7 +789,7 @@ | |
"hw" | |
}; | |
static const flatbuffers::TypeTable tt = { | |
- flatbuffers::ST_TABLE, 12, type_codes, nullptr, nullptr, names | |
+ flatbuffers::ST_TABLE, 12, type_codes, nullptr, nullptr, nullptr, names | |
}; | |
return &tt; | |
} | |
@@ -817,7 +808,7 @@ | |
"datetime" | |
}; | |
static const flatbuffers::TypeTable tt = { | |
- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names | |
+ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names | |
}; | |
return &tt; | |
} | |
@@ -842,7 +833,7 @@ | |
"comment" | |
}; | |
static const flatbuffers::TypeTable tt = { | |
- flatbuffers::ST_TABLE, 7, type_codes, nullptr, nullptr, names | |
+ flatbuffers::ST_TABLE, 7, type_codes, nullptr, nullptr, nullptr, names | |
}; | |
return &tt; | |
} | |
@@ -854,9 +845,9 @@ | |
{ flatbuffers::ET_SEQUENCE, 0, 2 } | |
}; | |
static const flatbuffers::TypeFunction type_refs[] = { | |
- GlobalTypeTable, | |
- AnnotationTypeTable, | |
- CaptureTypeTable | |
+ core::GlobalTypeTable, | |
+ core::AnnotationTypeTable, | |
+ core::CaptureTypeTable | |
}; | |
static const char * const names[] = { | |
"global", | |
@@ -864,7 +855,7 @@ | |
"capture" | |
}; | |
static const flatbuffers::TypeTable tt = { | |
- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names | |
+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names | |
}; | |
return &tt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment