-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regen master kaitai-io/kaitai_struct@29e6e6b
- Loading branch information
1 parent
17d1e51
commit db0c015
Showing
82 changed files
with
2,361 additions
and
297 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
nav_parent_recursive = Struct( | ||
'value' / Int8ub, | ||
'next' / If(this.value == 255, LazyBound(lambda: nav_parent_recursive)), | ||
'parent_value' / If(this.value != 255, Computed(lambda this: this._.value)), | ||
) | ||
|
||
_schema = nav_parent_recursive |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
nav_root_recursive = Struct( | ||
'value' / Int8ub, | ||
'next' / If(this.value == 255, LazyBound(lambda: nav_root_recursive)), | ||
'root_value' / Computed(lambda this: this._root.value), | ||
) | ||
|
||
_schema = nav_root_recursive |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
nested_types_import = Struct( | ||
'a_cc' / LazyBound(lambda: nested_types3__subtype_a__subtype_cc), | ||
'a_c_d' / LazyBound(lambda: nested_types3__subtype_a__subtype_c__subtype_d), | ||
'b' / LazyBound(lambda: nested_types3__subtype_b), | ||
) | ||
|
||
_schema = nested_types_import |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
params_call__my_str1 = Struct( | ||
'body' / FixedSized(this.len, GreedyString(encoding='UTF-8')), | ||
) | ||
|
||
params_call__my_str2 = Struct( | ||
'body' / FixedSized(this.len, GreedyString(encoding='UTF-8')), | ||
'trailer' / If(this.has_trailer, Int8ub), | ||
) | ||
|
||
params_call = Struct( | ||
'buf1' / LazyBound(lambda: params_call__my_str1), | ||
'buf2' / LazyBound(lambda: params_call__my_str2), | ||
) | ||
|
||
_schema = params_call |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "nav_parent_recursive.h" | ||
|
||
nav_parent_recursive_t::nav_parent_recursive_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, nav_parent_recursive_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
m_next = nullptr; | ||
f_parent_value = false; | ||
_read(); | ||
} | ||
|
||
void nav_parent_recursive_t::_read() { | ||
m_value = m__io->read_u1(); | ||
n_next = true; | ||
if (value() == 255) { | ||
n_next = false; | ||
m_next = std::unique_ptr<nav_parent_recursive_t>(new nav_parent_recursive_t(m__io)); | ||
} | ||
} | ||
|
||
nav_parent_recursive_t::~nav_parent_recursive_t() { | ||
_clean_up(); | ||
} | ||
|
||
void nav_parent_recursive_t::_clean_up() { | ||
if (!n_next) { | ||
} | ||
} | ||
|
||
uint8_t nav_parent_recursive_t::parent_value() { | ||
if (f_parent_value) | ||
return m_parent_value; | ||
n_parent_value = true; | ||
if (value() != 255) { | ||
n_parent_value = false; | ||
m_parent_value = static_cast<nav_parent_recursive_t*>(_parent())->value(); | ||
} | ||
f_parent_value = true; | ||
return m_parent_value; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#pragma once | ||
|
||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "kaitai/kaitaistruct.h" | ||
#include <stdint.h> | ||
#include <memory> | ||
|
||
#if KAITAI_STRUCT_VERSION < 11000L | ||
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required" | ||
#endif | ||
|
||
class nav_parent_recursive_t : public kaitai::kstruct { | ||
|
||
public: | ||
|
||
nav_parent_recursive_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, nav_parent_recursive_t* p__root = nullptr); | ||
|
||
private: | ||
void _read(); | ||
void _clean_up(); | ||
|
||
public: | ||
~nav_parent_recursive_t(); | ||
|
||
private: | ||
bool f_parent_value; | ||
uint8_t m_parent_value; | ||
bool n_parent_value; | ||
|
||
public: | ||
bool _is_null_parent_value() { parent_value(); return n_parent_value; }; | ||
|
||
private: | ||
|
||
public: | ||
uint8_t parent_value(); | ||
|
||
private: | ||
uint8_t m_value; | ||
std::unique_ptr<nav_parent_recursive_t> m_next; | ||
bool n_next; | ||
|
||
public: | ||
bool _is_null_next() { next(); return n_next; }; | ||
|
||
private: | ||
nav_parent_recursive_t* m__root; | ||
kaitai::kstruct* m__parent; | ||
|
||
public: | ||
uint8_t value() const { return m_value; } | ||
nav_parent_recursive_t* next() const { return m_next.get(); } | ||
nav_parent_recursive_t* _root() const { return m__root; } | ||
kaitai::kstruct* _parent() const { return m__parent; } | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "nav_root_recursive.h" | ||
|
||
nav_root_recursive_t::nav_root_recursive_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, nav_root_recursive_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
m_next = nullptr; | ||
f_root_value = false; | ||
_read(); | ||
} | ||
|
||
void nav_root_recursive_t::_read() { | ||
m_value = m__io->read_u1(); | ||
n_next = true; | ||
if (value() == 255) { | ||
n_next = false; | ||
m_next = std::unique_ptr<nav_root_recursive_t>(new nav_root_recursive_t(m__io)); | ||
} | ||
} | ||
|
||
nav_root_recursive_t::~nav_root_recursive_t() { | ||
_clean_up(); | ||
} | ||
|
||
void nav_root_recursive_t::_clean_up() { | ||
if (!n_next) { | ||
} | ||
} | ||
|
||
uint8_t nav_root_recursive_t::root_value() { | ||
if (f_root_value) | ||
return m_root_value; | ||
m_root_value = _root()->value(); | ||
f_root_value = true; | ||
return m_root_value; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#pragma once | ||
|
||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "kaitai/kaitaistruct.h" | ||
#include <stdint.h> | ||
#include <memory> | ||
|
||
#if KAITAI_STRUCT_VERSION < 11000L | ||
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required" | ||
#endif | ||
|
||
class nav_root_recursive_t : public kaitai::kstruct { | ||
|
||
public: | ||
|
||
nav_root_recursive_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, nav_root_recursive_t* p__root = nullptr); | ||
|
||
private: | ||
void _read(); | ||
void _clean_up(); | ||
|
||
public: | ||
~nav_root_recursive_t(); | ||
|
||
private: | ||
bool f_root_value; | ||
uint8_t m_root_value; | ||
|
||
public: | ||
uint8_t root_value(); | ||
|
||
private: | ||
uint8_t m_value; | ||
std::unique_ptr<nav_root_recursive_t> m_next; | ||
bool n_next; | ||
|
||
public: | ||
bool _is_null_next() { next(); return n_next; }; | ||
|
||
private: | ||
nav_root_recursive_t* m__root; | ||
kaitai::kstruct* m__parent; | ||
|
||
public: | ||
uint8_t value() const { return m_value; } | ||
nav_root_recursive_t* next() const { return m_next.get(); } | ||
nav_root_recursive_t* _root() const { return m__root; } | ||
kaitai::kstruct* _parent() const { return m__parent; } | ||
}; |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "nested_types_import.h" | ||
|
||
nested_types_import_t::nested_types_import_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, nested_types_import_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
m_a_cc = nullptr; | ||
m_a_c_d = nullptr; | ||
m_b = nullptr; | ||
_read(); | ||
} | ||
|
||
void nested_types_import_t::_read() { | ||
m_a_cc = std::unique_ptr<nested_types3_t::subtype_a_t::subtype_cc_t>(new nested_types3_t::subtype_a_t::subtype_cc_t(m__io, this, m__root)); | ||
m_a_c_d = std::unique_ptr<nested_types3_t::subtype_a_t::subtype_c_t::subtype_d_t>(new nested_types3_t::subtype_a_t::subtype_c_t::subtype_d_t(m__io, this, m__root)); | ||
m_b = std::unique_ptr<nested_types3_t::subtype_b_t>(new nested_types3_t::subtype_b_t(m__io, this, m__root)); | ||
} | ||
|
||
nested_types_import_t::~nested_types_import_t() { | ||
_clean_up(); | ||
} | ||
|
||
void nested_types_import_t::_clean_up() { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "kaitai/kaitaistruct.h" | ||
#include <stdint.h> | ||
#include <memory> | ||
|
||
#if KAITAI_STRUCT_VERSION < 11000L | ||
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required" | ||
#endif | ||
|
||
class nested_types_import_t : public kaitai::kstruct { | ||
|
||
public: | ||
|
||
nested_types_import_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, nested_types_import_t* p__root = nullptr); | ||
|
||
private: | ||
void _read(); | ||
void _clean_up(); | ||
|
||
public: | ||
~nested_types_import_t(); | ||
|
||
private: | ||
std::unique_ptr<nested_types3_t::subtype_a_t::subtype_cc_t> m_a_cc; | ||
std::unique_ptr<nested_types3_t::subtype_a_t::subtype_c_t::subtype_d_t> m_a_c_d; | ||
std::unique_ptr<nested_types3_t::subtype_b_t> m_b; | ||
nested_types_import_t* m__root; | ||
kaitai::kstruct* m__parent; | ||
|
||
public: | ||
nested_types3_t::subtype_a_t::subtype_cc_t* a_cc() const { return m_a_cc.get(); } | ||
nested_types3_t::subtype_a_t::subtype_c_t::subtype_d_t* a_c_d() const { return m_a_c_d.get(); } | ||
nested_types3_t::subtype_b_t* b() const { return m_b.get(); } | ||
nested_types_import_t* _root() const { return m__root; } | ||
kaitai::kstruct* _parent() const { return m__parent; } | ||
}; |
Oops, something went wrong.