Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitai-bot committed Dec 27, 2024
1 parent 250d8bd commit cd52236
Show file tree
Hide file tree
Showing 62 changed files with 2,556 additions and 236 deletions.
12 changes: 12 additions & 0 deletions compiled/construct/debug_array_user_current_excluded.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from construct import *
from construct.lib import *

debug_array_user_current_excluded__cat = Struct(
'meow' / FixedSized(3 - len(this._.array_of_cats), GreedyBytes),
)

debug_array_user_current_excluded = Struct(
'array_of_cats' / Array(3, LazyBound(lambda: debug_array_user_current_excluded__cat)),
)

_schema = debug_array_user_current_excluded
14 changes: 14 additions & 0 deletions compiled/construct/debug_array_user_eof_exception.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from construct import *
from construct.lib import *

debug_array_user_eof_exception__cat = Struct(
'meow' / Int8ub,
'chirp' / Int8ub,
)

debug_array_user_eof_exception = Struct(
'one_cat' / LazyBound(lambda: debug_array_user_eof_exception__cat),
'array_of_cats' / Array(3, LazyBound(lambda: debug_array_user_eof_exception__cat)),
)

_schema = debug_array_user_eof_exception
7 changes: 6 additions & 1 deletion compiled/cpp_stl_11/debug_array_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ void debug_array_user_t::_read() {
const int l_array_of_cats = 3;
for (int i = 0; i < l_array_of_cats; i++) {
std::unique_ptr<cat_t> _t_array_of_cats = std::unique_ptr<cat_t>(new cat_t(m__io, this, m__root));
try {
_t_array_of_cats->_read();
} catch(...) {
m_array_of_cats->push_back(std::move(_t_array_of_cats));
throw;
}
m_array_of_cats->push_back(std::move(_t_array_of_cats));
_t_array_of_cats->_read();
}
}

Expand Down
47 changes: 47 additions & 0 deletions compiled/cpp_stl_11/debug_array_user_current_excluded.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

#include "debug_array_user_current_excluded.h"

debug_array_user_current_excluded_t::debug_array_user_current_excluded_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, debug_array_user_current_excluded_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = p__root ? p__root : this;
m_array_of_cats = nullptr;
}

void debug_array_user_current_excluded_t::_read() {
m_array_of_cats = std::unique_ptr<std::vector<std::unique_ptr<cat_t>>>(new std::vector<std::unique_ptr<cat_t>>());
const int l_array_of_cats = 3;
for (int i = 0; i < l_array_of_cats; i++) {
std::unique_ptr<cat_t> _t_array_of_cats = std::unique_ptr<cat_t>(new cat_t(m__io, this, m__root));
try {
_t_array_of_cats->_read();
} catch(...) {
m_array_of_cats->push_back(std::move(_t_array_of_cats));
throw;
}
m_array_of_cats->push_back(std::move(_t_array_of_cats));
}
}

debug_array_user_current_excluded_t::~debug_array_user_current_excluded_t() {
_clean_up();
}

void debug_array_user_current_excluded_t::_clean_up() {
}

debug_array_user_current_excluded_t::cat_t::cat_t(kaitai::kstream* p__io, debug_array_user_current_excluded_t* p__parent, debug_array_user_current_excluded_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = p__root;
}

void debug_array_user_current_excluded_t::cat_t::_read() {
m_meow = m__io->read_bytes(3 - _parent()->array_of_cats()->size());
}

debug_array_user_current_excluded_t::cat_t::~cat_t() {
_clean_up();
}

void debug_array_user_current_excluded_t::cat_t::_clean_up() {
}
63 changes: 63 additions & 0 deletions compiled/cpp_stl_11/debug_array_user_current_excluded.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#pragma once

// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

class debug_array_user_current_excluded_t;

#include "kaitai/kaitaistruct.h"
#include <stdint.h>
#include <memory>
#include <vector>

#if KAITAI_STRUCT_VERSION < 11000L
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required"
#endif

class debug_array_user_current_excluded_t : public kaitai::kstruct {

public:
class cat_t;

debug_array_user_current_excluded_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, debug_array_user_current_excluded_t* p__root = nullptr);
void _read();

private:
void _clean_up();

public:
~debug_array_user_current_excluded_t();

class cat_t : public kaitai::kstruct {

public:

cat_t(kaitai::kstream* p__io, debug_array_user_current_excluded_t* p__parent = nullptr, debug_array_user_current_excluded_t* p__root = nullptr);
void _read();

private:
void _clean_up();

public:
~cat_t();

private:
std::string m_meow;
debug_array_user_current_excluded_t* m__root;
debug_array_user_current_excluded_t* m__parent;

public:
std::string meow() const { return m_meow; }
debug_array_user_current_excluded_t* _root() const { return m__root; }
debug_array_user_current_excluded_t* _parent() const { return m__parent; }
};

private:
std::unique_ptr<std::vector<std::unique_ptr<cat_t>>> m_array_of_cats;
debug_array_user_current_excluded_t* m__root;
kaitai::kstruct* m__parent;

public:
std::vector<std::unique_ptr<cat_t>>* array_of_cats() const { return m_array_of_cats.get(); }
debug_array_user_current_excluded_t* _root() const { return m__root; }
kaitai::kstruct* _parent() const { return m__parent; }
};
51 changes: 51 additions & 0 deletions compiled/cpp_stl_11/debug_array_user_eof_exception.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

#include "debug_array_user_eof_exception.h"

debug_array_user_eof_exception_t::debug_array_user_eof_exception_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, debug_array_user_eof_exception_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = p__root ? p__root : this;
m_one_cat = nullptr;
m_array_of_cats = nullptr;
}

void debug_array_user_eof_exception_t::_read() {
m_one_cat = std::unique_ptr<cat_t>(new cat_t(m__io, this, m__root));
m_one_cat->_read();
m_array_of_cats = std::unique_ptr<std::vector<std::unique_ptr<cat_t>>>(new std::vector<std::unique_ptr<cat_t>>());
const int l_array_of_cats = 3;
for (int i = 0; i < l_array_of_cats; i++) {
std::unique_ptr<cat_t> _t_array_of_cats = std::unique_ptr<cat_t>(new cat_t(m__io, this, m__root));
try {
_t_array_of_cats->_read();
} catch(...) {
m_array_of_cats->push_back(std::move(_t_array_of_cats));
throw;
}
m_array_of_cats->push_back(std::move(_t_array_of_cats));
}
}

debug_array_user_eof_exception_t::~debug_array_user_eof_exception_t() {
_clean_up();
}

void debug_array_user_eof_exception_t::_clean_up() {
}

debug_array_user_eof_exception_t::cat_t::cat_t(kaitai::kstream* p__io, debug_array_user_eof_exception_t* p__parent, debug_array_user_eof_exception_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = p__root;
}

void debug_array_user_eof_exception_t::cat_t::_read() {
m_meow = m__io->read_u1();
m_chirp = m__io->read_u1();
}

debug_array_user_eof_exception_t::cat_t::~cat_t() {
_clean_up();
}

void debug_array_user_eof_exception_t::cat_t::_clean_up() {
}
67 changes: 67 additions & 0 deletions compiled/cpp_stl_11/debug_array_user_eof_exception.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#pragma once

// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

class debug_array_user_eof_exception_t;

#include "kaitai/kaitaistruct.h"
#include <stdint.h>
#include <memory>
#include <vector>

#if KAITAI_STRUCT_VERSION < 11000L
#error "Incompatible Kaitai Struct C++/STL API: version 0.11 or later is required"
#endif

class debug_array_user_eof_exception_t : public kaitai::kstruct {

public:
class cat_t;

debug_array_user_eof_exception_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent = nullptr, debug_array_user_eof_exception_t* p__root = nullptr);
void _read();

private:
void _clean_up();

public:
~debug_array_user_eof_exception_t();

class cat_t : public kaitai::kstruct {

public:

cat_t(kaitai::kstream* p__io, debug_array_user_eof_exception_t* p__parent = nullptr, debug_array_user_eof_exception_t* p__root = nullptr);
void _read();

private:
void _clean_up();

public:
~cat_t();

private:
uint8_t m_meow;
uint8_t m_chirp;
debug_array_user_eof_exception_t* m__root;
debug_array_user_eof_exception_t* m__parent;

public:
uint8_t meow() const { return m_meow; }
uint8_t chirp() const { return m_chirp; }
debug_array_user_eof_exception_t* _root() const { return m__root; }
debug_array_user_eof_exception_t* _parent() const { return m__parent; }
};

private:
std::unique_ptr<cat_t> m_one_cat;
std::unique_ptr<std::vector<std::unique_ptr<cat_t>>> m_array_of_cats;
debug_array_user_eof_exception_t* m__root;
kaitai::kstruct* m__parent;

public:
cat_t* one_cat() const { return m_one_cat.get(); }
std::vector<std::unique_ptr<cat_t>>* array_of_cats() const { return m_array_of_cats.get(); }
debug_array_user_eof_exception_t* _root() const { return m__root; }
kaitai::kstruct* _parent() const { return m__parent; }
};
7 changes: 6 additions & 1 deletion compiled/cpp_stl_98/debug_array_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ void debug_array_user_t::_read() {
const int l_array_of_cats = 3;
for (int i = 0; i < l_array_of_cats; i++) {
cat_t* _t_array_of_cats = new cat_t(m__io, this, m__root);
try {
_t_array_of_cats->_read();
} catch(...) {
m_array_of_cats->push_back(_t_array_of_cats);
throw;
}
m_array_of_cats->push_back(_t_array_of_cats);
_t_array_of_cats->_read();
}
}

Expand Down
53 changes: 53 additions & 0 deletions compiled/cpp_stl_98/debug_array_user_current_excluded.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

#include "debug_array_user_current_excluded.h"

debug_array_user_current_excluded_t::debug_array_user_current_excluded_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, debug_array_user_current_excluded_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = p__root ? p__root : this;
m_array_of_cats = 0;
}

void debug_array_user_current_excluded_t::_read() {
m_array_of_cats = new std::vector<cat_t*>();
const int l_array_of_cats = 3;
for (int i = 0; i < l_array_of_cats; i++) {
cat_t* _t_array_of_cats = new cat_t(m__io, this, m__root);
try {
_t_array_of_cats->_read();
} catch(...) {
m_array_of_cats->push_back(_t_array_of_cats);
throw;
}
m_array_of_cats->push_back(_t_array_of_cats);
}
}

debug_array_user_current_excluded_t::~debug_array_user_current_excluded_t() {
_clean_up();
}

void debug_array_user_current_excluded_t::_clean_up() {
if (m_array_of_cats) {
for (std::vector<cat_t*>::iterator it = m_array_of_cats->begin(); it != m_array_of_cats->end(); ++it) {
delete *it;
}
delete m_array_of_cats; m_array_of_cats = 0;
}
}

debug_array_user_current_excluded_t::cat_t::cat_t(kaitai::kstream* p__io, debug_array_user_current_excluded_t* p__parent, debug_array_user_current_excluded_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = p__root;
}

void debug_array_user_current_excluded_t::cat_t::_read() {
m_meow = m__io->read_bytes(3 - _parent()->array_of_cats()->size());
}

debug_array_user_current_excluded_t::cat_t::~cat_t() {
_clean_up();
}

void debug_array_user_current_excluded_t::cat_t::_clean_up() {
}
Loading

0 comments on commit cd52236

Please sign in to comment.