Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitai-bot committed Sep 25, 2024
1 parent cfde790 commit cf59e0f
Show file tree
Hide file tree
Showing 18 changed files with 326 additions and 24 deletions.
2 changes: 2 additions & 0 deletions compiled/construct/expr_bytes_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
'one_mid' / Computed(lambda this: KaitaiStream.byte_array_index(this.one, 1)),
'one_min' / Computed(lambda this: KaitaiStream.byte_array_min(this.one)),
'one_size' / Computed(lambda this: len(this.one)),
'one_to_s' / Computed(lambda this: (this.one).decode(u"IBM866")),
'two' / Computed(lambda this: b"\x41\xFF\x4B"),
'two_first' / Computed(lambda this: KaitaiStream.byte_array_index(this.two, 0)),
'two_last' / Computed(lambda this: KaitaiStream.byte_array_index(this.two, -1)),
'two_max' / Computed(lambda this: KaitaiStream.byte_array_max(this.two)),
'two_mid' / Computed(lambda this: KaitaiStream.byte_array_index(this.two, 1)),
'two_min' / Computed(lambda this: KaitaiStream.byte_array_min(this.two)),
'two_size' / Computed(lambda this: len(this.two)),
'two_to_s' / Computed(lambda this: (this.two).decode(u"IBM866")),
)

_schema = expr_bytes_ops
18 changes: 18 additions & 0 deletions compiled/cpp_stl_11/expr_bytes_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ expr_bytes_ops_t::expr_bytes_ops_t(kaitai::kstream* p__io, kaitai::kstruct* p__p
f_one_mid = false;
f_one_min = false;
f_one_size = false;
f_one_to_s = false;
f_two = false;
f_two_first = false;
f_two_last = false;
f_two_max = false;
f_two_mid = false;
f_two_min = false;
f_two_size = false;
f_two_to_s = false;
_read();
}

Expand Down Expand Up @@ -80,6 +82,14 @@ int32_t expr_bytes_ops_t::one_size() {
return m_one_size;
}

std::string expr_bytes_ops_t::one_to_s() {
if (f_one_to_s)
return m_one_to_s;
f_one_to_s = true;
m_one_to_s = kaitai::kstream::bytes_to_str(one(), "IBM866");
return m_one_to_s;
}

std::string expr_bytes_ops_t::two() {
if (f_two)
return m_two;
Expand Down Expand Up @@ -135,3 +145,11 @@ int32_t expr_bytes_ops_t::two_size() {
m_two_size = two().length();
return m_two_size;
}

std::string expr_bytes_ops_t::two_to_s() {
if (f_two_to_s)
return m_two_to_s;
f_two_to_s = true;
m_two_to_s = kaitai::kstream::bytes_to_str(two(), "IBM866");
return m_two_to_s;
}
14 changes: 14 additions & 0 deletions compiled/cpp_stl_11/expr_bytes_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ class expr_bytes_ops_t : public kaitai::kstruct {
public:
int32_t one_size();

private:
bool f_one_to_s;
std::string m_one_to_s;

public:
std::string one_to_s();

private:
bool f_two;
std::string m_two;
Expand Down Expand Up @@ -116,6 +123,13 @@ class expr_bytes_ops_t : public kaitai::kstruct {
public:
int32_t two_size();

private:
bool f_two_to_s;
std::string m_two_to_s;

public:
std::string two_to_s();

private:
std::string m_one;
expr_bytes_ops_t* m__root;
Expand Down
18 changes: 18 additions & 0 deletions compiled/cpp_stl_98/expr_bytes_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ expr_bytes_ops_t::expr_bytes_ops_t(kaitai::kstream* p__io, kaitai::kstruct* p__p
f_one_mid = false;
f_one_min = false;
f_one_size = false;
f_one_to_s = false;
f_two = false;
f_two_first = false;
f_two_last = false;
f_two_max = false;
f_two_mid = false;
f_two_min = false;
f_two_size = false;
f_two_to_s = false;

try {
_read();
Expand Down Expand Up @@ -86,6 +88,14 @@ int32_t expr_bytes_ops_t::one_size() {
return m_one_size;
}

std::string expr_bytes_ops_t::one_to_s() {
if (f_one_to_s)
return m_one_to_s;
f_one_to_s = true;
m_one_to_s = kaitai::kstream::bytes_to_str(one(), "IBM866");
return m_one_to_s;
}

std::string expr_bytes_ops_t::two() {
if (f_two)
return m_two;
Expand Down Expand Up @@ -141,3 +151,11 @@ int32_t expr_bytes_ops_t::two_size() {
m_two_size = two().length();
return m_two_size;
}

std::string expr_bytes_ops_t::two_to_s() {
if (f_two_to_s)
return m_two_to_s;
f_two_to_s = true;
m_two_to_s = kaitai::kstream::bytes_to_str(two(), "IBM866");
return m_two_to_s;
}
14 changes: 14 additions & 0 deletions compiled/cpp_stl_98/expr_bytes_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ class expr_bytes_ops_t : public kaitai::kstruct {
public:
int32_t one_size();

private:
bool f_one_to_s;
std::string m_one_to_s;

public:
std::string one_to_s();

private:
bool f_two;
std::string m_two;
Expand Down Expand Up @@ -116,6 +123,13 @@ class expr_bytes_ops_t : public kaitai::kstruct {
public:
int32_t two_size();

private:
bool f_two_to_s;
std::string m_two_to_s;

public:
std::string two_to_s();

private:
std::string m_one;
expr_bytes_ops_t* m__root;
Expand Down
28 changes: 28 additions & 0 deletions compiled/csharp/ExprBytesOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ public ExprBytesOps(KaitaiStream p__io, KaitaiStruct p__parent = null, ExprBytes
f_oneMid = false;
f_oneMin = false;
f_oneSize = false;
f_oneToS = false;
f_two = false;
f_twoFirst = false;
f_twoLast = false;
f_twoMax = false;
f_twoMid = false;
f_twoMin = false;
f_twoSize = false;
f_twoToS = false;
_read();
}
private void _read()
Expand Down Expand Up @@ -112,6 +114,19 @@ public int OneSize
return _oneSize;
}
}
private bool f_oneToS;
private string _oneToS;
public string OneToS
{
get
{
if (f_oneToS)
return _oneToS;
f_oneToS = true;
_oneToS = (string) (System.Text.Encoding.GetEncoding("IBM866").GetString(One));
return _oneToS;
}
}
private bool f_two;
private byte[] _two;
public byte[] Two
Expand Down Expand Up @@ -203,6 +218,19 @@ public int TwoSize
return _twoSize;
}
}
private bool f_twoToS;
private string _twoToS;
public string TwoToS
{
get
{
if (f_twoToS)
return _twoToS;
f_twoToS = true;
_twoToS = (string) (System.Text.Encoding.GetEncoding("IBM866").GetString(Two));
return _twoToS;
}
}
private byte[] _one;
private ExprBytesOps m_root;
private KaitaiStruct m_parent;
Expand Down
83 changes: 59 additions & 24 deletions compiled/go/src/test_formats/expr_bytes_ops.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cf59e0f

Please sign in to comment.