-
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@5df7372
- Loading branch information
1 parent
fdd5468
commit 24ec7d3
Showing
248 changed files
with
11,347 additions
and
261 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
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,8 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
cast_to_imported2 = Struct( | ||
'hw' / Computed(lambda this: this.hw_param), | ||
) | ||
|
||
_schema = cast_to_imported2 |
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 * | ||
|
||
enum_import_literals = Struct( | ||
'pet_1_eq' / Computed(lambda this: ('chicken' if True else 'dog') == 'chicken'), | ||
'pet_1_to_i' / Computed(lambda this: int('cat')), | ||
'pet_2' / Computed(lambda this: 'hare'), | ||
) | ||
|
||
_schema = enum_import_literals |
4 changes: 2 additions & 2 deletions
4
compiled/construct/enum_import.py → compiled/construct/enum_import_seq.py
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
enum_import = Struct( | ||
enum_import_seq = Struct( | ||
'pet_1' / Enum(Int32ul, enum_0__animal), | ||
'pet_2' / Enum(Int32ul, enum_deep__container1__container2__animal), | ||
) | ||
|
||
_schema = enum_import | ||
_schema = enum_import_seq |
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,11 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
eof_exception_sized__foo = Struct( | ||
) | ||
|
||
eof_exception_sized = Struct( | ||
'buf' / FixedSized(13, LazyBound(lambda: eof_exception_sized__foo)), | ||
) | ||
|
||
_schema = eof_exception_sized |
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,15 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
eos_exception_sized__data = Struct( | ||
'buf' / FixedSized(7, LazyBound(lambda: eos_exception_sized__foo)), | ||
) | ||
|
||
eos_exception_sized__foo = Struct( | ||
) | ||
|
||
eos_exception_sized = Struct( | ||
'envelope' / FixedSized(6, LazyBound(lambda: eos_exception_sized__data)), | ||
) | ||
|
||
_schema = eos_exception_sized |
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,9 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
imports_cast_to_imported = Struct( | ||
'hw' / LazyBound(lambda: hello_world), | ||
'two' / LazyBound(lambda: cast_to_imported), | ||
) | ||
|
||
_schema = imports_cast_to_imported |
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,9 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
imports_cast_to_imported2 = Struct( | ||
'hw' / LazyBound(lambda: hello_world), | ||
'two' / LazyBound(lambda: cast_to_imported2), | ||
) | ||
|
||
_schema = imports_cast_to_imported2 |
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,9 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
imports_params_def_enum_imported = Struct( | ||
'one' / LazyBound(lambda: enum_import_seq), | ||
'two' / LazyBound(lambda: params_def_enum_imported), | ||
) | ||
|
||
_schema = imports_params_def_enum_imported |
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,9 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
imports_params_def_usertype_imported = Struct( | ||
'hw' / LazyBound(lambda: hello_world), | ||
'two' / LazyBound(lambda: params_def_usertype_imported), | ||
) | ||
|
||
_schema = imports_params_def_usertype_imported |
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,7 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
params_def_enum_imported = Struct( | ||
) | ||
|
||
_schema = params_def_enum_imported |
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,8 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
params_def_usertype_imported = Struct( | ||
'hw_one' / Computed(lambda this: this.hw_param.one), | ||
) | ||
|
||
_schema = params_def_usertype_imported |
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,31 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
str_encodings_escaping_enc__str1_wrapper = Struct( | ||
'v' / Pointer(0, GreedyString(encoding='ASCII\\x')), | ||
) | ||
|
||
str_encodings_escaping_enc__str2_wrapper = Struct( | ||
'v' / Pointer(0, GreedyString(encoding='UTF-8\'x')), | ||
) | ||
|
||
str_encodings_escaping_enc__str3_wrapper = Struct( | ||
'v' / Pointer(0, GreedyString(encoding='SJIS\"x')), | ||
) | ||
|
||
str_encodings_escaping_enc__str4_wrapper = Struct( | ||
'v' / Pointer(0, GreedyString(encoding='IBM437\nx')), | ||
) | ||
|
||
str_encodings_escaping_enc = Struct( | ||
'len_of_1' / Int16ul, | ||
'str1' / FixedSized(this.len_of_1, LazyBound(lambda: str_encodings_escaping_enc__str1_wrapper)), | ||
'len_of_2' / Int16ul, | ||
'str2' / FixedSized(this.len_of_2, LazyBound(lambda: str_encodings_escaping_enc__str2_wrapper)), | ||
'len_of_3' / Int16ul, | ||
'str3' / FixedSized(this.len_of_3, LazyBound(lambda: str_encodings_escaping_enc__str3_wrapper)), | ||
'len_of_4' / Int16ul, | ||
'str4' / FixedSized(this.len_of_4, LazyBound(lambda: str_encodings_escaping_enc__str4_wrapper)), | ||
) | ||
|
||
_schema = str_encodings_escaping_enc |
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,19 @@ | ||
from construct import * | ||
from construct.lib import * | ||
|
||
str_encodings_escaping_to_s = Struct( | ||
'len_of_1' / Int16ul, | ||
'str1_raw' / FixedSized(this.len_of_1, GreedyBytes), | ||
'len_of_2' / Int16ul, | ||
'str2_raw' / FixedSized(this.len_of_2, GreedyBytes), | ||
'len_of_3' / Int16ul, | ||
'str3_raw' / FixedSized(this.len_of_3, GreedyBytes), | ||
'len_of_4' / Int16ul, | ||
'str4_raw' / FixedSized(this.len_of_4, GreedyBytes), | ||
'str1' / Computed(lambda this: (this.str1_raw).decode("ASCII\\x")), | ||
'str2' / Computed(lambda this: (this.str2_raw).decode("UTF-8\'x")), | ||
'str3' / Computed(lambda this: (this.str3_raw).decode("SJIS\"x")), | ||
'str4' / Computed(lambda this: (this.str4_raw).decode("IBM437\nx")), | ||
) | ||
|
||
_schema = str_encodings_escaping_to_s |
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,29 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "cast_to_imported2.h" | ||
|
||
cast_to_imported2_t::cast_to_imported2_t(kaitai::kstruct* p_hw_param, kaitai::kstream* p__io, kaitai::kstruct* p__parent, cast_to_imported2_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
m_hw_param = p_hw_param; | ||
f_hw = false; | ||
_read(); | ||
} | ||
|
||
void cast_to_imported2_t::_read() { | ||
} | ||
|
||
cast_to_imported2_t::~cast_to_imported2_t() { | ||
_clean_up(); | ||
} | ||
|
||
void cast_to_imported2_t::_clean_up() { | ||
} | ||
|
||
hello_world_t* cast_to_imported2_t::hw() { | ||
if (f_hw) | ||
return m_hw; | ||
m_hw = static_cast<hello_world_t*>(hw_param()); | ||
f_hw = true; | ||
return m_hw; | ||
} |
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,42 @@ | ||
#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 cast_to_imported2_t : public kaitai::kstruct { | ||
|
||
public: | ||
|
||
cast_to_imported2_t(kaitai::kstruct* p_hw_param, kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, cast_to_imported2_t* p__root = nullptr); | ||
|
||
private: | ||
void _read(); | ||
void _clean_up(); | ||
|
||
public: | ||
~cast_to_imported2_t(); | ||
|
||
private: | ||
bool f_hw; | ||
hello_world_t* m_hw; | ||
|
||
public: | ||
hello_world_t* hw(); | ||
|
||
private: | ||
kaitai::kstruct* m_hw_param; | ||
cast_to_imported2_t* m__root; | ||
kaitai::kstruct* m__parent; | ||
|
||
public: | ||
kaitai::kstruct* hw_param() const { return m_hw_param; } | ||
cast_to_imported2_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,46 @@ | ||
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild | ||
|
||
#include "enum_import_literals.h" | ||
|
||
enum_import_literals_t::enum_import_literals_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, enum_import_literals_t* p__root) : kaitai::kstruct(p__io) { | ||
m__parent = p__parent; | ||
m__root = this; | ||
f_pet_1_eq = false; | ||
f_pet_1_to_i = false; | ||
f_pet_2 = false; | ||
_read(); | ||
} | ||
|
||
void enum_import_literals_t::_read() { | ||
} | ||
|
||
enum_import_literals_t::~enum_import_literals_t() { | ||
_clean_up(); | ||
} | ||
|
||
void enum_import_literals_t::_clean_up() { | ||
} | ||
|
||
bool enum_import_literals_t::pet_1_eq() { | ||
if (f_pet_1_eq) | ||
return m_pet_1_eq; | ||
m_pet_1_eq = ((true) ? (enum_0_t::ANIMAL_CHICKEN) : (enum_0_t::ANIMAL_DOG)) == enum_0_t::ANIMAL_CHICKEN; | ||
f_pet_1_eq = true; | ||
return m_pet_1_eq; | ||
} | ||
|
||
int32_t enum_import_literals_t::pet_1_to_i() { | ||
if (f_pet_1_to_i) | ||
return m_pet_1_to_i; | ||
m_pet_1_to_i = enum_0_t::ANIMAL_CAT; | ||
f_pet_1_to_i = true; | ||
return m_pet_1_to_i; | ||
} | ||
|
||
enum_deep_t::container1_t::container2_t::animal_t enum_import_literals_t::pet_2() { | ||
if (f_pet_2) | ||
return m_pet_2; | ||
m_pet_2 = enum_deep_t::container1_t::container2_t::ANIMAL_HARE; | ||
f_pet_2 = true; | ||
return m_pet_2; | ||
} |
Oops, something went wrong.